@@ -8733,19 +8733,19 @@ where
8733
8733
Name : "subqueries should coerce union types" ,
8734
8734
Dialect : "mysql" ,
8735
8735
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 )" ,
8737
8737
"insert into enum_table values (1,'a'),(2,'b')" ,
8738
8738
"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) " ,
8740
8740
},
8741
8741
Assertions : []ScriptTestAssertion {
8742
8742
{
8743
8743
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 } },
8745
8745
},
8746
8746
{
8747
8747
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 } },
8749
8749
},
8750
8750
},
8751
8751
},
0 commit comments