@@ -121,52 +121,6 @@ type ScriptTestAssertion struct {
121121// Unlike other engine tests, ScriptTests must be self-contained. No other tables are created outside the definition of
122122// the tests.
123123var ScriptTests = []ScriptTest {
124- {
125- // https://github.com/dolthub/dolt/pull/9830
126- Name : "CREATE SCHEMA without database selection falls back to CREATE DATABASE" ,
127- SetUpScript : []string {
128- "CREATE DATABASE tmp" ,
129- "USE tmp" ,
130- },
131- Dialect : "mysql" ,
132- Assertions : []ScriptTestAssertion {
133- {
134- Query : "DROP DATABASE tmp" ,
135- },
136- {
137- Query : "CREATE SCHEMA NewDatabase" ,
138- Expected : []sql.Row {{types.OkResult {RowsAffected : 1 }}},
139- },
140- {
141- Query : "SHOW DATABASES" ,
142- Expected : []sql.Row {{"NewDatabase" }, {"information_schema" }, {"mydb" }, {"mysql" }},
143- },
144- {
145- Query : "USE NewDatabase" ,
146- Expected : []sql.Row {},
147- },
148- {
149- Query : "SELECT DATABASE()" ,
150- Expected : []sql.Row {{"NewDatabase" }},
151- },
152- {
153- Query : "CREATE TABLE test_table (id INT PRIMARY KEY)" ,
154- Expected : []sql.Row {{types.OkResult {RowsAffected : 0 }}},
155- },
156- {
157- Query : "SHOW TABLES" ,
158- Expected : []sql.Row {{"test_table" }},
159- },
160- {
161- Query : "USE mydb" ,
162- Expected : []sql.Row {},
163- },
164- {
165- Query : "DROP DATABASE NewDatabase" ,
166- Expected : []sql.Row {{types.OkResult {RowsAffected : 1 }}},
167- },
168- },
169- },
170124 {
171125 // https://github.com/dolthub/go-mysql-server/issues/3216
172126 Name : "UNION ALL with BLOB columns" ,
@@ -13565,6 +13519,52 @@ var BrokenScriptTests = []ScriptTest{
1356513519}
1356613520
1356713521var CreateDatabaseScripts = []ScriptTest {
13522+ {
13523+ // https://github.com/dolthub/dolt/pull/9830
13524+ Name : "CREATE SCHEMA without database selection falls back to CREATE DATABASE" ,
13525+ SetUpScript : []string {
13526+ "CREATE DATABASE tmp" ,
13527+ "USE tmp" ,
13528+ },
13529+ Dialect : "mysql" ,
13530+ Assertions : []ScriptTestAssertion {
13531+ {
13532+ Query : "DROP DATABASE tmp" ,
13533+ },
13534+ {
13535+ Query : "CREATE SCHEMA NewDatabase" ,
13536+ Expected : []sql.Row {{types.OkResult {RowsAffected : 1 }}},
13537+ },
13538+ {
13539+ Query : "SHOW DATABASES" ,
13540+ Expected : []sql.Row {{"NewDatabase" }, {"information_schema" }, {"mydb" }, {"mysql" }},
13541+ },
13542+ {
13543+ Query : "USE NewDatabase" ,
13544+ Expected : []sql.Row {},
13545+ },
13546+ {
13547+ Query : "SELECT DATABASE()" ,
13548+ Expected : []sql.Row {{"NewDatabase" }},
13549+ },
13550+ {
13551+ Query : "CREATE TABLE test_table (id INT PRIMARY KEY)" ,
13552+ Expected : []sql.Row {{types.OkResult {RowsAffected : 0 }}},
13553+ },
13554+ {
13555+ Query : "SHOW TABLES" ,
13556+ Expected : []sql.Row {{"test_table" }},
13557+ },
13558+ {
13559+ Query : "USE mydb" ,
13560+ Expected : []sql.Row {},
13561+ },
13562+ {
13563+ Query : "DROP DATABASE NewDatabase" ,
13564+ Expected : []sql.Row {{types.OkResult {RowsAffected : 1 }}},
13565+ },
13566+ },
13567+ },
1356813568 {
1356913569 Name : "CREATE DATABASE and create table" ,
1357013570 Assertions : []ScriptTestAssertion {
0 commit comments