@@ -1158,15 +1158,18 @@ FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'mydb'`,
11581158 SetUpScript : []string {
11591159 "USE foo" ,
11601160 "drop table othertable" ,
1161- "CREATE TABLE t (i int)" ,
1162- "CREATE VIEW v as select * from t" ,
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" ,
11631163 },
11641164 Assertions : []ScriptTestAssertion {
11651165 {
11661166 Query : "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'foo'" ,
11671167 Expected : []sql.Row {
1168- {"def" , "foo" , "t" , "i" , uint32 (1 ), nil , "YES" , "int" , nil , nil , int64 (10 ), int64 (0 ), nil , nil , nil , "int" , "" , "" , "insert,references,select,update" , "" , "" , nil },
1169- {"def" , "foo" , "v" , "" , uint32 (0 ), nil , "" , nil , nil , nil , nil , nil , nil , "" , "" , "" , "" , "" , "select" , "" , "" , nil },
1168+ {"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 },
1170+ {"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 },
11701173 },
11711174 },
11721175 },
0 commit comments