Skip to content

Commit bfac21e

Browse files
author
James Cor
committed
add test
1 parent 4977cba commit bfac21e

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

enginetest/memory_engine_test.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,19 +202,22 @@ func TestSingleQueryPrepared(t *testing.T) {
202202

203203
// Convenience test for debugging a single query. Unskip and set to the desired query.
204204
func TestSingleScript(t *testing.T) {
205-
//t.Skip()
205+
t.Skip()
206206
var scripts = []queries.ScriptTest{
207207
{
208-
Name: "test script",
209-
SetUpScript: []string{
210-
"CREATE TABLE test (pk INTEGER PRIMARY KEY, name TEXT NOT NULL) COLLATE=utf8mb4_0900_ai_ci;",
211-
"INSERT INTO test VALUES (1, 'aBcDeF');",
212-
},
208+
Name: "AS OF propagates to nested CALLs",
209+
SetUpScript: []string{},
213210
Assertions: []queries.ScriptTestAssertion{
214211
{
215-
Query: "select 'abcdef' in (select name from test)",
212+
Query: "create procedure create_proc() create table t (i int primary key, j int);",
213+
Expected: []sql.Row{
214+
{types.NewOkResult(0)},
215+
},
216+
},
217+
{
218+
Query: "call create_proc()",
216219
Expected: []sql.Row{
217-
{true},
220+
{types.NewOkResult(0)},
218221
},
219222
},
220223
},

enginetest/queries/script_queries.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8712,6 +8712,22 @@ where
87128712
},
87138713
},
87148714
},
8715+
{
8716+
Name: "subquery with case insensitive collation",
8717+
Dialect: "mysql",
8718+
SetUpScript: []string{
8719+
"create table tbl (t text) collate=utf8mb4_0900_ai_ci;",
8720+
"insert into tbl values ('abcdef');",
8721+
},
8722+
Assertions: []ScriptTestAssertion{
8723+
{
8724+
Query: "select 'AbCdEf' in (select t from tbl);",
8725+
Expected: []sql.Row{
8726+
{true},
8727+
},
8728+
},
8729+
},
8730+
},
87158731
}
87168732

87178733
var SpatialScriptTests = []ScriptTest{

0 commit comments

Comments
 (0)