MDEV-8851 innodb.innodb_information_schema fails sporadically

The column INFORMATION_SCHEMA.INNODB_LOCKS.LOCK_DATA
would report NULL when the page that contains the locked
record does not reside in the buffer pool.

Pages may be evicted from the buffer pool due to some background
activity, such as the purge of transaction history loading
undo log pages to the buffer pool. The regression tests intentionally
run with a small buffer pool size setting.

To prevent the intermittent test failures, we will filter out the
contents of the LOCK_DATA column from the output.
This commit is contained in:
Marko Mäkelä 2022-01-14 15:53:29 +02:00
parent a3267c11fa
commit d7f4fd30f2
2 changed files with 16 additions and 14 deletions

View File

@ -1,18 +1,18 @@
lock_mode lock_type lock_table lock_index lock_rec lock_data
X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
X RECORD `test`.```t'\"_str` PRIMARY 1 #
X RECORD `test`.```t'\"_str` PRIMARY 1 #
X RECORD `test`.```t'\"_str` PRIMARY 2 #
X RECORD `test`.```t'\"_str` PRIMARY 2 #
X RECORD `test`.```t'\"_str` PRIMARY 3 #
X RECORD `test`.```t'\"_str` PRIMARY 3 #
X RECORD `test`.```t'\"_str` PRIMARY 4 #
X RECORD `test`.```t'\"_str` PRIMARY 4 #
X RECORD `test`.```t'\"_str` PRIMARY 5 #
X RECORD `test`.```t'\"_str` PRIMARY 5 #
X RECORD `test`.`t_max` PRIMARY 2 #
X RECORD `test`.`t_max` PRIMARY 2 #
X RECORD `test`.`t_min` PRIMARY 2 #
X RECORD `test`.`t_min` PRIMARY 2 #
lock_table COUNT(*)
`test`.`t_max` 2
`test`.`t_min` 2

View File

@ -148,6 +148,8 @@ if (!$success)
-- echo Timeout waiting for rows in INNODB_LOCKS to appear
}
--replace_column 6 #
--sorted_result
SELECT lock_mode, lock_type, lock_table, lock_index, lock_rec, lock_data
FROM INFORMATION_SCHEMA.INNODB_LOCKS ORDER BY lock_data;