@@ -1158,18 +1158,27 @@ FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'mydb'`,
11581158 SetUpScript : []string {
11591159 "USE foo" ,
11601160 "drop table othertable" ,
1161- "CREATE TABLE t (i int primary key, j int)" ,
1162- "CREATE VIEW v as select i + 1, j * 2, mod(i, j) from t" ,
1161+ "CREATE TABLE t (i int primary key, j int default (uuid_to_bin(uuid())));" ,
1162+ "CREATE VIEW v as select i + 1, j, j * 2, mod(i, j) from t;" ,
1163+ "create table tt (ii int primary key, jj int default (pow(1, 2)));" ,
1164+ "create view vv as select * from t join tt where i = ii;" ,
11631165 },
11641166 Assertions : []ScriptTestAssertion {
11651167 {
11661168 Query : "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'foo'" ,
11671169 Expected : []sql.Row {
11681170 {"def" , "foo" , "t" , "i" , uint32 (1 ), nil , "NO" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "PRI" , "" , "insert,references,select,update" , "" , "" , nil },
1169- {"def" , "foo" , "t" , "j" , uint32 (2 ), nil , "YES" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1171+ {"def" , "foo" , "t" , "j" , uint32 (2 ), "UUID_TO_BIN(uuid())" , "YES" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "DEFAULT_GENERATED" , "insert,references,select,update" , "" , "" , nil },
1172+ {"def" , "foo" , "tt" , "ii" , uint32 (1 ), nil , "NO" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "PRI" , "" , "insert,references,select,update" , "" , "" , nil },
1173+ {"def" , "foo" , "tt" , "jj" , uint32 (2 ), "power(1, 2)" , "YES" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "DEFAULT_GENERATED" , "insert,references,select,update" , "" , "" , nil },
11701174 {"def" , "foo" , "v" , "i + 1" , uint32 (1 ), nil , "NO" , "bigint" , nil , nil , 19 , 0 , nil , nil , nil , "bigint" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1171- {"def" , "foo" , "v" , "j * 2" , uint32 (2 ), nil , "YES" , "bigint" , nil , nil , 19 , 0 , nil , nil , nil , "bigint" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1172- {"def" , "foo" , "v" , "mod(i, j)" , uint32 (3 ), nil , "YES" , "decimal" , nil , nil , 10 , 0 , nil , nil , nil , "decimal(10,0)" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1175+ {"def" , "foo" , "v" , "j" , uint32 (2 ), "UUID_TO_BIN(uuid())" , "YES" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "DEFAULT_GENERATED" , "insert,references,select,update" , "" , "" , nil },
1176+ {"def" , "foo" , "v" , "j * 2" , uint32 (3 ), nil , "YES" , "bigint" , nil , nil , 19 , 0 , nil , nil , nil , "bigint" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1177+ {"def" , "foo" , "v" , "mod(i, j)" , uint32 (4 ), nil , "YES" , "decimal" , nil , nil , 10 , 0 , nil , nil , nil , "decimal(10,0)" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1178+ {"def" , "foo" , "vv" , "i" , uint32 (1 ), nil , "NO" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1179+ {"def" , "foo" , "vv" , "j" , uint32 (2 ), "UUID_TO_BIN(uuid())" , "YES" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "DEFAULT_GENERATED" , "insert,references,select,update" , "" , "" , nil },
1180+ {"def" , "foo" , "vv" , "ii" , uint32 (3 ), nil , "NO" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1181+ {"def" , "foo" , "vv" , "jj" , uint32 (4 ), "power(1, 2)" , "YES" , "int" , nil , nil , 10 , 0 , nil , nil , nil , "int" , "" , "DEFAULT_GENERATED" , "insert,references,select,update" , "" , "" , nil },
11731182 },
11741183 },
11751184 },
0 commit comments