1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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 7ca89af6f8 (MDEV-30545)
along with this test case.
This commit is contained in:
Marko Mäkelä
2024-08-27 08:51:45 +03:00
parent 36ab75a498
commit 8cc822283e
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;