Skip to content

Commit 78556d4

Browse files
committed
update showtablestatus_test
1 parent fb067c8 commit 78556d4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sql/rowexec/showtablestatus_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func TestShowTableStatus(t *testing.T) {
3535
db2 := memory.NewDatabase("b")
3636
db2.AddTable("t3", memory.NewTable(db2, "t3", sql.PrimaryKeySchema{}, db2.GetForeignKeyCollection()))
3737
db2.AddTable("t4", memory.NewTable(db2, "t4", sql.PrimaryKeySchema{}, db2.GetForeignKeyCollection()))
38+
db2.AddTable("t5", memory.NewPartitionedTableWithCollation(db2.Database(), "t5", sql.PrimaryKeySchema{}, db2.GetForeignKeyCollection(), 0, sql.Collation_Default, "table comment"))
3839

3940
catalog := test.NewCatalog(sql.NewDatabaseProvider(db1, db2))
4041
pro := memory.NewDBProvider(db1, db2)
@@ -51,8 +52,8 @@ func TestShowTableStatus(t *testing.T) {
5152
require.NoError(err)
5253

5354
expected := []sql.Row{
54-
{"t1", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, nil},
55-
{"t2", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, nil},
55+
{"t1", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, ""},
56+
{"t2", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, ""},
5657
}
5758

5859
require.ElementsMatch(expected, rows)
@@ -66,8 +67,9 @@ func TestShowTableStatus(t *testing.T) {
6667
require.NoError(err)
6768

6869
expected = []sql.Row{
69-
{"t3", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, nil},
70-
{"t4", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, nil},
70+
{"t3", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, ""},
71+
{"t4", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, ""},
72+
{"t5", "InnoDB", "10", "Fixed", uint64(0), uint64(0), uint64(0), uint64(0), int64(0), int64(0), nil, nil, nil, nil, sql.Collation_Default.String(), nil, nil, "table comment"},
7173
}
7274

7375
require.ElementsMatch(expected, rows)

0 commit comments

Comments
 (0)