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

MDEV-20149 innodb.innodb-system-table-view fails with wrong result

The test occasionally fails with different table reference count
due to purge activity after INSERT operations (MDEV-12288).
Wait for purge before accessing dict_table_t::n_ref_count.
This commit is contained in:
Marko Mäkelä
2019-08-29 18:25:24 +03:00
parent d4246e25e5
commit d58437d195
2 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,8 @@
--source include/innodb_page_size_small.inc
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
LET $MYSQLD_DATADIR = `select @@datadir`;
LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
@ -70,6 +72,8 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
# INNODB_SYS_TABLESTATS
INSERT INTO parent VALUES(1);
--source include/wait_all_purged.inc
--sorted_result
SELECT name, num_rows, ref_count
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
@ -126,6 +130,8 @@ INSERT INTO parent VALUES(1, 9);
--sorted_result
SELECT * FROM parent WHERE id IN (SELECT id FROM parent);
--source include/wait_all_purged.inc
--sorted_result
SELECT name, num_rows, ref_count
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
@ -134,3 +140,4 @@ WHERE name LIKE "%parent";
DROP TABLE child;
DROP TABLE parent;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;