@@ -9224,7 +9224,7 @@ where
9224
9224
},
9225
9225
},
9226
9226
{
9227
- Skip : true ,
9227
+ // Skip: true,
9228
9228
Query : "select e from t where e like 'a%' order by e;" ,
9229
9229
Expected : []sql.Row {
9230
9230
{"abc" },
@@ -9389,6 +9389,37 @@ where
9389
9389
},
9390
9390
},
9391
9391
},
9392
+ {
9393
+ Name : "Convert enum columns to string columns with alter table" ,
9394
+ SetUpScript : []string {
9395
+ "create table t(pk int primary key, c0 enum('a', 'b', 'c'));" ,
9396
+ "insert into t values(0, 'a'), (1, 'b'), (2, 'c');" ,
9397
+ "alter table t modify column c0 varchar(100);" ,
9398
+ },
9399
+ Assertions : []ScriptTestAssertion {
9400
+ {
9401
+ Query : "select * from t" ,
9402
+ Expected : []sql.Row {{0 , "a" }, {1 , "b" }, {2 , "c" }},
9403
+ },
9404
+ },
9405
+ },
9406
+ {
9407
+ // https://github.com/dolthub/dolt/issues/9613
9408
+ Skip : true ,
9409
+ Name : "Convert enum columns to string columns when copying table" ,
9410
+ SetUpScript : []string {
9411
+ "create table t(pk int primary key, c0 enum('a', 'b', 'c'));" ,
9412
+ "insert into t values(0, 'a'), (1, 'b'), (2, 'c');" ,
9413
+ "create table tt(pk int primary key, c0 varchar(10))" ,
9414
+ "insert into tt select * from t" ,
9415
+ },
9416
+ Assertions : []ScriptTestAssertion {
9417
+ {
9418
+ Query : "select * from tt" ,
9419
+ Expected : []sql.Row {{0 , "a" }, {1 , "b" }, {2 , "c" }},
9420
+ },
9421
+ },
9422
+ },
9392
9423
{
9393
9424
Name : "enums with foreign keys" ,
9394
9425
Dialect : "mysql" ,
@@ -10001,6 +10032,37 @@ where
10001
10032
},
10002
10033
},
10003
10034
},
10035
+ {
10036
+ Name : "Convert set columns to string columns with alter table" ,
10037
+ SetUpScript : []string {
10038
+ "create table t(pk int primary key, c0 set('abc', 'def','ghi'))" ,
10039
+ "insert into t values(0, 'abc,def'), (1, 'def'), (2, 'ghi');" ,
10040
+ "alter table t modify column c0 varchar(100);" ,
10041
+ },
10042
+ Assertions : []ScriptTestAssertion {
10043
+ {
10044
+ Query : "select * from t" ,
10045
+ Expected : []sql.Row {{0 , "abc,def" }, {1 , "def" }, {2 , "ghi" }},
10046
+ },
10047
+ },
10048
+ },
10049
+ {
10050
+ // https://github.com/dolthub/dolt/issues/9613
10051
+ Skip : true ,
10052
+ Name : "Convert set columns to string columns when copying table" ,
10053
+ SetUpScript : []string {
10054
+ "create table t(pk int primary key, c0 set('abc', 'def','ghi'))" ,
10055
+ "insert into t values(0, 'abc,def'), (1, 'def'), (2, 'ghi');" ,
10056
+ "create table tt(pk int primary key, c0 varchar(10))" ,
10057
+ "insert into tt select * from t" ,
10058
+ },
10059
+ Assertions : []ScriptTestAssertion {
10060
+ {
10061
+ Query : "select * from tt" ,
10062
+ Expected : []sql.Row {{0 , "abc,def" }, {1 , "def" }, {2 , "ghi" }},
10063
+ },
10064
+ },
10065
+ },
10004
10066
{
10005
10067
Name : "set with duplicates" ,
10006
10068
Dialect : "mysql" ,
0 commit comments