Skip to content

Commit 0097f74

Browse files
author
James Cor
committed
a test
1 parent cd68330 commit 0097f74

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

enginetest/queries/information_schema_queries.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,18 +1158,19 @@ 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;",
11631163
},
11641164
Assertions: []ScriptTestAssertion{
11651165
{
11661166
Query: "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'foo'",
11671167
Expected: []sql.Row{
11681168
{"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},
1169+
{"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},
11701170
{"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},
1171+
{"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},
1172+
{"def", "foo", "v", "j * 2", uint32(3), nil, "YES", "bigint", nil, nil, 19, 0, nil, nil, nil, "bigint", "", "", "insert,references,select,update", "", "", nil},
1173+
{"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},
11731174
},
11741175
},
11751176
},

0 commit comments

Comments
 (0)