Skip to content

Commit

Permalink
tests: Fix unstable test alter_pk (#8917) (#8995)
Browse files Browse the repository at this point in the history
close #8916
  • Loading branch information
ti-chi-bot authored May 7, 2024
1 parent 8940b70 commit 5b44361
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 5b44361

Please sign in to comment.