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 7ca89af6f8faf1f8ec6ede01a9353ac499d37711 (MDEV-30545) along with this test case.
This commit is contained in:
parent
36ab75a498
commit
8cc822283e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user