Commit 8cc82228 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-34515 fixup: innodb.innodb_defrag_concurrent fails

Let us avoid EXTENDED in the CHECK TABLE after a defragmentation,
because it would occasionally report an orphan delete-marked record
in the index "third". That error does not seem to be reproducible
when using the regular OPTIMIZE TABLE.

Also, let us make the test --repeat safe by removing the defragmentation
related statistics after DROP TABLE.

The defragmentation feature was removed in later releases in
commit 7ca89af6 (MDEV-30545)
along with this test case.
parent 36ab75a4
......@@ -75,7 +75,7 @@ disconnect con4;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
check table t1 extended;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
select count(*) from t1;
......@@ -97,6 +97,7 @@ select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like
count(stat_value) > 0
1
drop table t1;
delete from mysql.innodb_index_stats where table_name='t1';
SET GLOBAL innodb_defragment_n_pages = @n_pages;
SET GLOBAL innodb_defragment_stats_accuracy = @accuracy;
SET GLOBAL innodb_stats_persistent = @sp;
......@@ -124,7 +124,7 @@ disconnect con3;
disconnect con4;
optimize table t1;
check table t1 extended;
check table t1;
select count(*) from t1;
select count(*) from t1 force index (second);
......@@ -136,6 +136,7 @@ select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like
select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name in ('n_leaf_pages_defrag');
drop table t1;
delete from mysql.innodb_index_stats where table_name='t1';
# reset system
SET GLOBAL innodb_defragment_n_pages = @n_pages;
......
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