Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 21, 2024. It is now read-only.

Commit 3b142af

Browse files
Adrian WalkerAdrian Walker
Adrian Walker
and
Adrian Walker
authored
CLOUD-1456: SERVERLESS - CREATE DATABASE (#2375)
statement without a units qualifier causes it to be set to 0 Co-authored-by: Adrian Walker <adrian.walker@molecula.comm>
1 parent c619b7d commit 3b142af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎sql3/planner/compilecreatedatabase.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ func (p *ExecutionPlanner) compileCreateDatabaseStatement(stmt *parser.CreateDat
1717
databaseName := strings.ToLower(parser.IdentName(stmt.Name))
1818
failIfExists := !stmt.IfNotExists.IsValid()
1919

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

2326
// apply database options

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /