Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Fix unstable test alter_pk (#8917) #8996

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/fullstack-test2/ddl/alter_pk.test
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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─┐
Expand All @@ -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─┐
Expand Down