Skip to content

Commit

Permalink
workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
JaySon-Huang committed Nov 9, 2023
1 parent 1da01d6 commit a82c452
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/fullstack-test2/ddl/alter_partition_by.test
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ mysql> create table test.t2 (a int primary key, b varchar(255), c int, key (b),
mysql> alter table test.t2 set tiflash replica 1;
mysql> insert into test.t2 select * from test.t;
func> wait_table test t2
mysql> drop table test.t;

mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t2 order by a;
+---------+---------+----------+
Expand All @@ -166,8 +167,6 @@ mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t2
| 1500004 | 1500004 | -1500004 |
+---------+---------+----------+

mysql> drop table test.t;

# check the t2 is created in TiFlash
>> select tidb_database,tidb_name from system.tables where tidb_database = 'test' and tidb_name = 't2' and is_tombstone = 0
┌─tidb_database─┬─tidb_name─┐
Expand All @@ -177,6 +176,9 @@ mysql> drop table test.t;
mysql> alter table test.t2 partition by hash (a) partitions 3;
mysql> analyze table test.t2;

#TODO this is just a workaround, the tidb return before waitting tiflash replica available for the new partitions
SLEEP 10

mysql> set session tidb_isolation_read_engines='tiflash'; select count(*) from test.t2 partition (p0);
+----------+
| count(*) |
Expand Down

0 comments on commit a82c452

Please sign in to comment.