Commit aca29bb7 authored by Aleksey Midenkov's avatar Aleksey Midenkov

Fix test case for MDEV-16222

* Mitigate race candition when got_no_such_table remains uncleared.
* Remove warnings about deprecated SELECT .. FROM .. INTO ...

MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes
parent ed33a5df
...@@ -10,9 +10,7 @@ pk serial, vb tinyblob as (b) virtual, b tinyblob, ...@@ -10,9 +10,7 @@ pk serial, vb tinyblob as (b) virtual, b tinyblob,
primary key(pk), index (vb(64))) primary key(pk), index (vb(64)))
engine innodb; engine innodb;
insert ignore into t1 (b) values ('foo'); insert ignore into t1 (b) values ('foo');
select * from t1 into outfile 'load.data'; select * into outfile 'load.data' from t1;
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
load data infile 'load.data' replace into table t1; load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR latch_released"; set debug_sync= "now WAIT_FOR latch_released";
set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1"; set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1";
...@@ -23,12 +21,10 @@ pk serial, vb tinyblob as (b) virtual, b tinyblob, ...@@ -23,12 +21,10 @@ pk serial, vb tinyblob as (b) virtual, b tinyblob,
primary key(pk), index (vb(64))) primary key(pk), index (vb(64)))
engine innodb; engine innodb;
insert ignore into t1 (b) values ('foo'); insert ignore into t1 (b) values ('foo');
select * from t1 into outfile 'load.data'; select * into outfile 'load.data' from t1;
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
load data infile 'load.data' replace into table t1; load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR got_no_such_table"; set debug_sync= "now WAIT_FOR got_no_such_table";
set debug_sync= "RESET"; set global debug_dbug= @saved_dbug;
drop table t1; drop table t1;
set global innodb_purge_rseg_truncate_frequency= @saved_frequency; set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
set global debug_dbug= @saved_dbug; set debug_sync= "RESET";
...@@ -18,7 +18,7 @@ engine innodb; ...@@ -18,7 +18,7 @@ engine innodb;
insert ignore into t1 (b) values ('foo'); insert ignore into t1 (b) values ('foo');
select * from t1 into outfile 'load.data'; select * into outfile 'load.data' from t1;
load data infile 'load.data' replace into table t1; load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR latch_released"; set debug_sync= "now WAIT_FOR latch_released";
...@@ -35,15 +35,19 @@ engine innodb; ...@@ -35,15 +35,19 @@ engine innodb;
insert ignore into t1 (b) values ('foo'); insert ignore into t1 (b) values ('foo');
select * from t1 into outfile 'load.data'; select * into outfile 'load.data' from t1;
load data infile 'load.data' replace into table t1; load data infile 'load.data' replace into table t1;
set debug_sync= "now WAIT_FOR got_no_such_table"; set debug_sync= "now WAIT_FOR got_no_such_table";
set debug_sync= "RESET"; # FIXME: Racing condition here:
# 1. purge thread goes into sending got_no_such_table
# 2. test thread finishes debug_sync= "RESET" below
# 3. purge thread sends got_no_such_table
set global debug_dbug= @saved_dbug;
# cleanup # cleanup
drop table t1; drop table t1;
--remove_file $datadir/test/load.data --remove_file $datadir/test/load.data
set global innodb_purge_rseg_truncate_frequency= @saved_frequency; set global innodb_purge_rseg_truncate_frequency= @saved_frequency;
set global debug_dbug= @saved_dbug; set debug_sync= "RESET";
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment