From 4e6228be8c94a8724d9dc4524601fc61b313efeb Mon Sep 17 00:00:00 2001 From: JaySon Date: Fri, 26 Apr 2024 12:49:41 +0800 Subject: [PATCH] tests: Fix unstable test alter_pk (#8917) close pingcap/tiflash#8916 --- tests/fullstack-test2/ddl/alter_pk.test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/fullstack-test2/ddl/alter_pk.test b/tests/fullstack-test2/ddl/alter_pk.test index 564860c4dac..6e6c6c1a73d 100644 --- a/tests/fullstack-test2/ddl/alter_pk.test +++ b/tests/fullstack-test2/ddl/alter_pk.test @@ -18,8 +18,8 @@ mysql> alter table test.t set tiflash replica 1 location labels 'rack', 'host', func> wait_table test t -mysql> insert into test.t values (1, 1, 1, 1, 1, 1); -mysql> insert into test.t values (1, 2, 3, NULL, NULL, 1); +mysql> insert into test.t values (1, 1, 1, 1, 1, 1),(1, 2, 3, NULL, NULL, 1); +## add primary key will remove the nullable on column `a`,`b`,`c` mysql> alter table test.t add primary key new_pk(a,b,c) USING RTREE; mysql> select /*+ read_from_storage(tiflash[t]) */ * from test.t; @@ -31,6 +31,7 @@ mysql> select /*+ read_from_storage(tiflash[t]) */ * from test.t; +---+---+---+------+------+------+ >> DBGInvoke __refresh_schemas() +>> DBGInvoke __refresh_table_schema(test, t); >> DBGInvoke query_mapped('desc \$d.\$t', test, t) ┌─name────────┬─type────────────┬─default_type─┬─default_expression─┐ @@ -46,6 +47,7 @@ mysql> select /*+ read_from_storage(tiflash[t]) */ * from test.t; mysql> alter table test.t drop primary key; >> DBGInvoke __refresh_schemas() +>> DBGInvoke __refresh_table_schema(test, t); >> DBGInvoke query_mapped('desc \$d.\$t', test, t) ┌─name────────┬─type────────────┬─default_type─┬─default_expression─┐