Skip to content

Commit 936afd9

Browse files
committed
add null case
1 parent 66de91d commit 936afd9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

enginetest/queries/script_queries.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8733,19 +8733,19 @@ where
87338733
Name: "subqueries should coerce union types",
87348734
Dialect: "mysql",
87358735
SetUpScript: []string{
8736-
"create table enum_table (i int primary key, e enum('a','b'))",
8736+
"create table enum_table (i int primary key, e enum('a','b') not null)",
87378737
"insert into enum_table values (1,'a'),(2,'b')",
87388738
"create table uv (u int primary key, v varchar(10))",
8739-
"insert into uv values (0, 'bug'),(1,'ant')",
8739+
"insert into uv values (0, 'bug'),(1,'ant'),(3, null)",
87408740
},
87418741
Assertions: []ScriptTestAssertion{
87428742
{
87438743
Query: "select * from (select e from enum_table union select v from uv) sq",
8744-
Expected: []sql.Row{{"a"}, {"b"}, {"bug"}, {"ant"}},
8744+
Expected: []sql.Row{{"a"}, {"b"}, {"bug"}, {"ant"}, {nil}},
87458745
},
87468746
{
87478747
Query: "with a as (select e from enum_table union select v from uv) select * from a",
8748-
Expected: []sql.Row{{"a"}, {"b"}, {"bug"}, {"ant"}},
8748+
Expected: []sql.Row{{"a"}, {"b"}, {"bug"}, {"ant"}, {nil}},
87498749
},
87508750
},
87518751
},

0 commit comments

Comments
 (0)