Skip to content

Commit b1ab211

Browse files
committed
MDEV-15053 Reduce buf_pool_t::mutex contention
User-visible changes: The INFORMATION_SCHEMA views INNODB_BUFFER_PAGE and INNODB_BUFFER_PAGE_LRU will report a dummy value FLUSH_TYPE=0 and will no longer report the PAGE_STATE value READY_FOR_USE. We will remove some fields from buf_page_t and move much code to member functions of buf_pool_t and buf_page_t, so that the access rules of data members can be enforced consistently. Evicting or adding pages in buf_pool.LRU will remain covered by buf_pool.mutex. Evicting or adding pages in buf_pool.page_hash will remain covered by both buf_pool.mutex and the buf_pool.page_hash X-latch. After this fix, buf_pool.page_hash lookups can entirely avoid acquiring buf_pool.mutex, only relying on buf_pool.hash_lock_get() S-latch. Similarly, buf_flush_check_neighbors() can will rely solely on buf_pool.mutex, no buf_pool.page_hash latch at all. The buf_pool.mutex is rather contended in I/O heavy benchmarks, especially when the workload does not fit in the buffer pool. The first attempt to alleviate the contention was the buf_pool_t::mutex split in commit 4ed7082 which introduced buf_block_t::mutex, which we are now removing. Later, multiple instances of buf_pool_t were introduced in commit c18084f and recently removed by us in commit 1a6f708 (MDEV-15058). UNIV_BUF_DEBUG: Remove. This option to enable some buffer pool related debugging in otherwise non-debug builds has not been used for years. Instead, we have been using UNIV_DEBUG, which is enabled in CMAKE_BUILD_TYPE=Debug. buf_block_t::mutex, buf_pool_t::zip_mutex: Remove. We can mainly rely on std::atomic and the buf_pool.page_hash latches, and in some cases depend on buf_pool.mutex or buf_pool.flush_list_mutex just like before. We must always release buf_block_t::lock before invoking unfix() or io_unfix(), to prevent a glitch where a block that was added to the buf_pool.free list would apper X-latched. See commit c5883de how this glitch was finally caught in a debug environment. We move some buf_pool_t::page_hash specific code from the ha and hash modules to buf_pool, for improved readability. buf_pool_t::close(): Assert that all blocks are clean, except on aborted startup or crash-like shutdown. buf_pool_t::validate(): No longer attempt to validate n_flush[] against the number of BUF_IO_WRITE fixed blocks, because buf_page_t::flush_type no longer exists. buf_pool_t::watch_set(): Replaces buf_pool_watch_set(). Reduce mutex contention by separating the buf_pool.watch[] allocation and the insert into buf_pool.page_hash. buf_pool_t::page_hash_lock<bool exclusive>(): Acquire a buf_pool.page_hash latch. Replaces and extends buf_page_hash_lock_s_confirm() and buf_page_hash_lock_x_confirm(). buf_pool_t::READ_AHEAD_PAGES: Renamed from BUF_READ_AHEAD_PAGES. buf_pool_t::curr_size, old_size, read_ahead_area, n_pend_reads: Use Atomic_counter. buf_pool_t::running_out(): Replaces buf_LRU_buf_pool_running_out(). buf_pool_t::LRU_remove(): Remove a block from the LRU list and return its predecessor. Incorporates buf_LRU_adjust_hp(), which was removed. buf_page_get_gen(): Remove a redundant call of fsp_is_system_temporary(), for mode == BUF_GET_IF_IN_POOL_OR_WATCH, which is only used by BTR_DELETE_OP (purge), which is never invoked on temporary tables. buf_free_from_unzip_LRU_list_batch(): Avoid redundant assignments. buf_LRU_free_from_unzip_LRU_list(): Simplify the loop condition. buf_LRU_free_page(): Clarify the function comment. buf_flush_check_neighbor(), buf_flush_check_neighbors(): Rewrite the construction of the page hash range. We will hold the buf_pool.mutex for up to buf_pool.read_ahead_area (at most 64) consecutive lookups of buf_pool.page_hash. buf_flush_page_and_try_neighbors(): Remove. Merge to its only callers, and remove redundant operations in buf_flush_LRU_list_batch(). buf_read_ahead_random(), buf_read_ahead_linear(): Rewrite. Do not acquire buf_pool.mutex, and iterate directly with page_id_t. ut_2_power_up(): Remove. my_round_up_to_next_power() is inlined and avoids any loops. fil_page_get_prev(), fil_page_get_next(), fil_addr_is_null(): Remove. buf_flush_page(): Add a fil_space_t* parameter. Minimize the buf_pool.mutex hold time. buf_pool.n_flush[] is no longer updated atomically with the io_fix, and we will protect most buf_block_t fields with buf_block_t::lock. The function buf_flush_write_block_low() is removed and merged here. buf_page_init_for_read(): Use static linkage. Initialize the newly allocated block and acquire the exclusive buf_block_t::lock while not holding any mutex. IORequest::IORequest(): Remove the body. We only need to invoke set_punch_hole() in buf_flush_page() and nowhere else. buf_page_t::flush_type: Remove. Replaced by IORequest::flush_type. This field is only used during a fil_io() call. That function already takes IORequest as a parameter, so we had better introduce for the rarely changing field. buf_block_t::init(): Replaces buf_page_init(). buf_page_t::init(): Replaces buf_page_init_low(). buf_block_t::initialise(): Initialise many fields, but keep the buf_page_t::state(). Both buf_pool_t::validate() and buf_page_optimistic_get() requires that buf_page_t::in_file() be protected atomically with buf_page_t::in_page_hash and buf_page_t::in_LRU_list. buf_page_optimistic_get(): Now that buf_block_t::mutex no longer exists, we must check buf_page_t::io_fix() after acquiring the buf_pool.page_hash lock, to detect whether buf_page_init_for_read() has been initiated. We will also check the io_fix() before acquiring hash_lock in order to avoid unnecessary computation. The field buf_block_t::modify_clock (protected by buf_block_t::lock) allows buf_page_optimistic_get() to validate the block. buf_page_t::real_size: Remove. It was only used while flushing pages of page_compressed tables. buf_page_encrypt(): Add an output parameter that allows us ot eliminate buf_page_t::real_size. Replace a condition with debug assertion. buf_page_should_punch_hole(): Remove. buf_dblwr_t::add_to_batch(): Replaces buf_dblwr_add_to_batch(). Add the parameter size (to replace buf_page_t::real_size). buf_dblwr_t::write_single_page(): Replaces buf_dblwr_write_single_page(). Add the parameter size (to replace buf_page_t::real_size). fil_system_t::detach(): Replaces fil_space_detach(). Ensure that fil_validate() will not be violated even if fil_system.mutex is released and reacquired. fil_node_t::complete_io(): Renamed from fil_node_complete_io(). fil_node_t::close_to_free(): Replaces fil_node_close_to_free(). Avoid invoking fil_node_t::close() because fil_system.n_open has already been decremented in fil_space_t::detach(). BUF_BLOCK_READY_FOR_USE: Remove. Directly use BUF_BLOCK_MEMORY. BUF_BLOCK_ZIP_DIRTY: Remove. Directly use BUF_BLOCK_ZIP_PAGE, and distinguish dirty pages by buf_page_t::oldest_modification(). BUF_BLOCK_POOL_WATCH: Remove. Use BUF_BLOCK_NOT_USED instead. This state was only being used for buf_page_t that are in buf_pool.watch. buf_pool_t::watch[]: Remove pointer indirection. buf_page_t::in_flush_list: Remove. It was set if and only if buf_page_t::oldest_modification() is nonzero. buf_page_decrypt_after_read(), buf_corrupt_page_release(), buf_page_check_corrupt(): Change the const fil_space_t* parameter to const fil_node_t& so that we can report the correct file name. buf_page_monitor(): Declare as an ATTRIBUTE_COLD global function. buf_page_io_complete(): Split to buf_page_read_complete() and buf_page_write_complete(). buf_dblwr_t::in_use: Remove. buf_dblwr_t::buf_block_array: Add IORequest::flush_t. buf_dblwr_sync_datafiles(): Remove. It was a useless wrapper of os_aio_wait_until_no_pending_writes(). buf_flush_write_complete(): Declare static, not global. Add the parameter IORequest::flush_t. buf_flush_freed_page(): Simplify the code. recv_sys_t::flush_lru: Renamed from flush_type and changed to bool. fil_read(), fil_write(): Replaced with direct use of fil_io(). fil_buffering_disabled(): Remove. Check srv_file_flush_method directly. fil_mutex_enter_and_prepare_for_io(): Return the resolved fil_space_t* to avoid a duplicated lookup in the caller. fil_report_invalid_page_access(): Clean up the parameters. fil_io(): Return fil_io_t, which comprises fil_node_t and error code. Always invoke fil_space_t::acquire_for_io() and let either the sync=true caller or fil_aio_callback() invoke fil_space_t::release_for_io(). fil_aio_callback(): Rewrite to replace buf_page_io_complete(). fil_check_pending_operations(): Remove a parameter, and remove some redundant lookups. fil_node_close_to_free(): Wait for n_pending==0. Because we no longer do an extra lookup of the tablespace between fil_io() and the completion of the operation, we must give fil_node_t::complete_io() a chance to decrement the counter. fil_close_tablespace(): Remove unused parameter trx, and document that this is only invoked during the error handling of IMPORT TABLESPACE. row_import_discard_changes(): Merged with the only caller, row_import_cleanup(). Do not lock up the data dictionary while invoking fil_close_tablespace(). logs_empty_and_mark_files_at_shutdown(): Do not invoke fil_close_all_files(), to avoid a !needs_flush assertion failure on fil_node_t::close(). innodb_shutdown(): Invoke os_aio_free() before fil_close_all_files(). fil_close_all_files(): Invoke fil_flush_file_spaces() to ensure proper durability. thread_pool::unbind(): Fix a crash that would occur on Windows after srv_thread_pool->disable_aio() and os_file_close(). This fix was submitted by Vladislav Vaintroub. Thanks to Matthias Leich and Axel Schwenke for extensive testing, Vladislav Vaintroub for helpful comments, and Eugene Kosov for a review.
1 parent 9c55f83 commit b1ab211

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+4102
-7045
lines changed

mysql-test/suite/encryption/r/innodb-redo-badkey.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
call mtr.add_suppression("Plugin 'file_key_management'");
22
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
3-
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test/t[1-4]\\.ibd' cannot be decrypted");
3+
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted");
44
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
55
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
6-
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[12] page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
7-
call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*");
6+
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'");
7+
call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
88
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
99
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
1010
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");

mysql-test/suite/encryption/t/corrupted_during_recovery.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
66
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
77
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
8-
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page");
9-
call mtr.add_suppression("InnoDB: Failed to read file '.*test.t1\\.ibd' at offset 3: Table is encrypted but decrypt failed");
8+
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
9+
call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is encrypted but decrypt failed");
1010
call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted");
1111
call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table.");
1212
--enable_query_log

mysql-test/suite/encryption/t/innodb-redo-badkey.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
call mtr.add_suppression("Plugin 'file_key_management'");
1111
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
12-
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test/t[1-4]\\.ibd' cannot be decrypted");
12+
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted");
1313
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
1414
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
15-
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[12] page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
16-
call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*");
15+
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'");
16+
call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
1717
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
1818
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
1919
# for innodb_checksum_algorithm=full_crc32 only
Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,35 @@
11
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
2-
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
3-
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
4-
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
2+
POOL_ID POOL_SIZE FREE_BUFFERS DATABASE_PAGES OLD_DATABASE_PAGES MODIFIED_DATABASE_PAGES PENDING_DECOMPRESS PENDING_READS PENDING_FLUSH_LRU PENDING_FLUSH_LIST PAGES_MADE_YOUNG PAGES_NOT_MADE_YOUNG PAGES_MADE_YOUNG_RATE PAGES_MADE_NOT_YOUNG_RATE NUMBER_PAGES_READ NUMBER_PAGES_CREATED NUMBER_PAGES_WRITTEN PAGES_READ_RATE PAGES_CREATE_RATE PAGES_WRITTEN_RATE NUMBER_PAGES_GET HIT_RATE YOUNG_MAKE_PER_THOUSAND_GETS NOT_YOUNG_MAKE_PER_THOUSAND_GETS NUMBER_PAGES_READ_AHEAD NUMBER_READ_AHEAD_EVICTED READ_AHEAD_RATE READ_AHEAD_EVICTED_RATE LRU_IO_TOTAL LRU_IO_CURRENT UNCOMPRESS_TOTAL UNCOMPRESS_CURRENT
3+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
54
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
65
INSERT INTO infoschema_buffer_test VALUES(9);
7-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
8-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
9-
WHERE TABLE_NAME like "%infoschema_buffer_test%"
10-
and PAGE_STATE="file_page" and PAGE_TYPE="index";
11-
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
12-
`test`.`infoschema_buffer_test` GEN_CLUST_INDEX 1 29 FILE_PAGE INDEX
6+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
7+
WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
8+
POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
9+
0 # # 3 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` GEN_CLUST_INDEX 1 29 0 FILE_PAGE IO_FIX OLD #
1310
INSERT INTO infoschema_buffer_test VALUES(19);
14-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
15-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
16-
WHERE TABLE_NAME like "%infoschema_buffer_test%"
17-
and PAGE_STATE="file_page" and PAGE_TYPE="index";
18-
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
19-
`test`.`infoschema_buffer_test` GEN_CLUST_INDEX 2 58 FILE_PAGE INDEX
2011
CREATE INDEX idx ON infoschema_buffer_test(col1);
21-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
22-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
23-
WHERE TABLE_NAME like "%infoschema_buffer_test%"
24-
and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
25-
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
26-
`test`.`infoschema_buffer_test` idx 2 32 FILE_PAGE INDEX
27-
`test`.`infoschema_buffer_test` idx 2 32 FILE_PAGE INDEX
12+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
13+
WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
14+
POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
15+
0 # # 3 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` GEN_CLUST_INDEX 2 58 0 FILE_PAGE IO_FIX OLD #
16+
0 # # 4 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` idx 2 32 0 FILE_PAGE IO_FIX OLD #
17+
0 # # 5 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_buffer_test` idx 2 32 0 FILE_PAGE IO_FIX OLD #
2818
DROP TABLE infoschema_buffer_test;
29-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
30-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
31-
WHERE TABLE_NAME like "%infoschema_buffer_test%";
32-
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
19+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
20+
WHERE TABLE_NAME LIKE '%infoschema_buffer_test%';
21+
POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
3322
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
3423
ENGINE=INNODB;
3524
CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
3625
FOREIGN KEY (parent_id)
3726
REFERENCES infoschema_parent(id)
3827
ON DELETE CASCADE)
3928
ENGINE=INNODB;
40-
SELECT count(*)
41-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
42-
WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
43-
and PAGE_TYPE="index";
44-
count(*)
45-
2
29+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
30+
WHERE TABLE_NAME LIKE '%infoschema_child%';
31+
POOL_ID BLOCK_ID SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE PAGE_STATE IO_FIX IS_OLD FREE_PAGE_CLOCK
32+
0 # # 3 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_child` GEN_CLUST_INDEX 0 0 0 FILE_PAGE IO_FIX OLD #
33+
0 # # 4 INDEX 0 FIX AHI LSN LSN TIME `test`.`infoschema_child` par_ind 0 0 0 FILE_PAGE IO_FIX OLD #
4634
DROP TABLE infoschema_child;
4735
DROP TABLE infoschema_parent;

mysql-test/suite/innodb/t/corrupted_during_recovery.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
55
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
66
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
7-
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page");
8-
call mtr.add_suppression("InnoDB: Failed to read file '.*test.t1\\.ibd' at offset 3: Page read from tablespace is corrupted.");
7+
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
8+
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
99
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=3\\]");
1010
call mtr.add_suppression("InnoDB: Table `test`.`t1` is corrupted. Please drop the table and recreate.");
1111
--enable_query_log

mysql-test/suite/innodb/t/innodb_bug14147491.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
--disable_query_log
1111
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted\\. Please drop the table and recreate\\.");
12-
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page");
12+
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
1313
call mtr.add_suppression("InnoDB: We detected index corruption in an InnoDB type table");
1414
call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it");
1515
--enable_query_log

mysql-test/suite/innodb/t/innodb_information_schema_buffer.test

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,37 @@
88

99
-- source include/have_innodb.inc
1010

11-
-- disable_result_log
11+
--replace_regex /([0-9]*\.)?[0-9]+/#/
1212
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
1313

14-
# How many buffer pools we have
15-
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
16-
17-
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
18-
19-
# This gives the over all buffer pool size
20-
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
21-
22-
-- enable_result_log
23-
2414
# Create a table and check its page info behave correctly in the pool
2515
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
2616

2717
INSERT INTO infoschema_buffer_test VALUES(9);
2818

2919
# We should be able to see this table in the buffer pool if we check
3020
# right away
31-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
32-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
33-
WHERE TABLE_NAME like "%infoschema_buffer_test%"
34-
and PAGE_STATE="file_page" and PAGE_TYPE="index";
21+
--sorted_result
22+
--replace_column 2 # 3 # 7 FIX 8 AHI 9 LSN 10 LSN 11 TIME 18 IO_FIX 19 OLD 20 #
23+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
24+
WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
3525

3626
# The NUMBER_RECORDS and DATA_SIZE should check with each insertion
3727
INSERT INTO infoschema_buffer_test VALUES(19);
3828

39-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
40-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
41-
WHERE TABLE_NAME like "%infoschema_buffer_test%"
42-
and PAGE_STATE="file_page" and PAGE_TYPE="index";
43-
4429
CREATE INDEX idx ON infoschema_buffer_test(col1);
4530

46-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
47-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
48-
WHERE TABLE_NAME like "%infoschema_buffer_test%"
49-
and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
50-
31+
--sorted_result
32+
--replace_column 2 # 3 # 7 FIX 8 AHI 9 LSN 10 LSN 11 TIME 18 IO_FIX 19 OLD 20 #
33+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
34+
WHERE TABLE_NAME LIKE '%infoschema_buffer_test%' AND PAGE_TYPE='index';
5135

5236
# Check the buffer after dropping the table
5337
DROP TABLE infoschema_buffer_test;
5438

55-
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
56-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
57-
WHERE TABLE_NAME like "%infoschema_buffer_test%";
39+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
40+
WHERE TABLE_NAME LIKE '%infoschema_buffer_test%';
5841

59-
# Do one more test
60-
#--replace_regex /'*[0-9]*'/'NUM'/
6142
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
6243
ENGINE=INNODB;
6344

@@ -67,11 +48,10 @@ CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
6748
ON DELETE CASCADE)
6849
ENGINE=INNODB;
6950

70-
SELECT count(*)
71-
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
72-
WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
73-
and PAGE_TYPE="index";
51+
--sorted_result
52+
--replace_column 2 # 3 # 7 FIX 8 AHI 9 LSN 10 LSN 11 TIME 18 IO_FIX 19 OLD 20 #
53+
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
54+
WHERE TABLE_NAME LIKE '%infoschema_child%';
7455

7556
DROP TABLE infoschema_child;
7657
DROP TABLE infoschema_parent;
77-

mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
--source include/have_debug.inc
33

44
--disable_query_log
5-
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page ");
5+
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
66
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=19\\]");
7-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read file '.*test.t1\\.ibd' at offset 19: Page read from tablespace is corrupted\\.");
7+
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read page 19 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted\\.");
88
call mtr.add_suppression("\\[ERROR\\] InnoDB: Plugin initialization aborted at srv0start\\.cc.* with error Data structure corruption");
99
call mtr.add_suppression("\\[ERROR\\] Plugin 'InnoDB' (init function|registration)");
1010
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption");

mysql-test/suite/innodb_i_s/innodb_buffer_page.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ INNODB_BUFFER_PAGE CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE` (
1717
`NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT 0,
1818
`DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
1919
`COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT 0,
20-
`PAGE_STATE` enum('NOT_USED','READY_FOR_USE','FILE_PAGE','MEMORY','REMOVE_HASH') NOT NULL,
20+
`PAGE_STATE` enum('NOT_USED','MEMORY','REMOVE_HASH','FILE_PAGE') NOT NULL,
2121
`IO_FIX` enum('IO_NONE','IO_READ','IO_WRITE','IO_PIN') NOT NULL,
2222
`IS_OLD` int(1) NOT NULL DEFAULT 0,
2323
`FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT 0

mysql-test/suite/innodb_i_s/innodb_buffer_page_lru.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ INNODB_BUFFER_PAGE_LRU CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE_LRU` (
66
`SPACE` int(11) unsigned NOT NULL DEFAULT 0,
77
`PAGE_NUMBER` int(11) unsigned NOT NULL DEFAULT 0,
88
`PAGE_TYPE` varchar(64) DEFAULT NULL,
9-
`FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT 0,
9+
`FLUSH_TYPE` int(11) unsigned NOT NULL DEFAULT 0,
1010
`FIX_COUNT` int(11) unsigned NOT NULL DEFAULT 0,
1111
`IS_HASHED` int(1) NOT NULL DEFAULT 0,
1212
`NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT 0,

0 commit comments

Comments
 (0)