Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
CLOUD-1456: SERVERLESS - CREATE DATABASE (#2375)
Browse files Browse the repository at this point in the history
statement without a units qualifier causes it to be set to 0

Co-authored-by: Adrian Walker <adrian.walker@molecula.comm>
  • Loading branch information
Adrian Walker and Adrian Walker committed Apr 7, 2023
1 parent c619b7d commit 3b142af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sql3/planner/compilecreatedatabase.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ func (p *ExecutionPlanner) compileCreateDatabaseStatement(stmt *parser.CreateDat
databaseName := strings.ToLower(parser.IdentName(stmt.Name))
failIfExists := !stmt.IfNotExists.IsValid()

units := 0
// By default, a database needs at least 1 unit for simple querying, so by
// setting the default to 1, users can simply type `CREATE DATABASE [name]` without
// needing to append `WITH UNITS 1;`
units := 1
description := ""

// apply database options
Expand Down

0 comments on commit 3b142af

Please sign in to comment.