mariadb/mysql-test/suite
Marko Mäkelä 3cdbcc69dd MDEV-32067 InnoDB linear read ahead had better be logical
The linear read-ahead, which is enabled by default by a
nonzero default value of innodb_read_ahead_threshold=56,
only works if index leaf pages or undo log pages have been
allocated on adjacent page numbers. That is not always the case.

After this change, the exact nonzero values of
innodb_read_ahead_threshold matter only for the read-ahead of
undo log pages. For the read-ahead of B-tree leaf pages when
starting a read from an index, it only matters if
innodb_read_ahead_threshold=0.

buf_read_ahead_undo(): Renamed from buf_read_ahead_linear().
This function will no longer be invoked on any BLOB pages
(for which FIL_PAGE_PREV and FIL_PAGE_NEXT were not initialized
consistently) nor on any index pages. For index leaf pages,
we will introduce buf_read_ahead_one() and buf_read_ahead_pages().

btr_cur_t::search_leaf(), btr_cur_t::open_leaf(): Implement
read-ahead for up to 16 leaf-level B-tree pages. This logic
is enabled by a nonzero value of innodb_read_ahead_threshold;
the actual value will not matter here.

buf_read_ahead_update(), buf_read_ahead_update_sql(): Some common code
for updating counters.

buf_read_ahead_one(): Read ahead one (sibling leaf) page.
This logic cannot be disabled.

buf_read_ahead_pages(): Read ahead B-tree index leaf pages.

buf_read_ahead_random(): Split the function into two parts: one
that determines which range of pages should be read, and another
that actually initiates a read of the pages.

buf_read_page_low(): Remove a bogus comment.

btr_pcur_move_to_next_page(): Invoke buf_read_ahead_one()
instead of buf_read_ahead_linear().

btr_pcur_move_backward_from_page(): Implement a fast path of
trying to acquire a latch on the previous page without waiting,
and invoke buf_read_ahead_one() on the preceding page, with the
assumption that we may be accessing that page in the near future.

btr_copy_blob_prefix(): Simplify the logic. On other than
ROW_FORMAT=COMPRESSED BLOB pages, the FIL_PAGE_NEXT field is not
meaningfully initialized. The FIL_PAGE_PREV field is not pointing
to anything meaningful either. buf_read_ahead_linear() expects
these to be set meaningfully. Only the non-default setting
innodb_random_read_ahead=ON might be meaningful here.
2025-06-27 17:02:11 +03:00
..
archive test: archive-big test too big for msan 2025-04-07 11:04:53 +02:00
atomic MDEV-36666 - atomic.alter_table still times out often 2025-04-25 10:40:47 +04:00
binlog Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
binlog_encryption Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
client
compat Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
csv Backporting bugs fixes fixed by MDEV-31340 from 11.5 2024-05-21 14:58:01 +04:00
encryption MDEV-32067 InnoDB linear read ahead had better be logical 2025-06-27 17:02:11 +03:00
engines Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
federated MDEV-31846: enable cursor protocol for test federatedx_create_handlers 2025-04-07 11:04:53 +02:00
funcs_1 MDEV-36848: identify tests with various MSAN suitability 2025-05-28 16:33:49 +10:00
funcs_2 Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
galera MDEV-36627 : galera.MDEV-29142: certification position less than last commited 2025-05-20 20:59:10 +02:00
galera_3nodes MDEV-36512 : galera_3nodes.GCF-354: certification position less than last committed 2025-05-20 20:59:10 +02:00
galera_3nodes_sr galera mtr tests: synchronization between branches and editions 2025-04-02 04:50:11 +02:00
galera_sr Merge branch '10.5' into '10.6' 2025-04-02 04:43:24 +02:00
gcol Merge branch '10.5' into 10.6 2025-04-21 10:43:17 +02:00
handler Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
heap Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
innodb MDEV-35863 innodb.doublewrite_debug test case fails to start the server 2025-06-23 15:48:43 +05:30
innodb_fts MDEV-30363 InnoDB: Failing assertion: trx->error_state == DB_SUCCESS in que_run_threads 2025-06-16 11:48:06 +02:00
innodb_gis MDEV-36848: identify tests with various MSAN suitability 2025-05-28 16:33:49 +10:00
innodb_i_s
innodb_zip Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
jp
json MDEV-34679 ER_BAD_FIELD uses non-localizable substrings 2024-10-17 21:37:37 +02:00
large_tests fix failing large_tests.maria_recover_encrypted 2024-04-22 17:22:11 +02:00
maria MDEV-36848: identify tests with various MSAN suitability 2025-05-28 16:33:49 +10:00
mariabackup Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
mtr/t Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
mtr2
multi_source MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
optimizer_unfixed_bugs
parts Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
perfschema MDEV-36848: identify tests with various MSAN suitability 2025-05-28 16:33:49 +10:00
perfschema_stress
period Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
plugins Merge branch '10.5' into 10.6 2025-04-21 10:43:17 +02:00
roles Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
rpl MDEV-36359: Patch NULL deref after disabling Semi-Sync primary 2025-04-17 15:56:45 -06:00
s3 MDEV-29157 SELECT using ror_merged scan fails with s3 tables 2025-06-02 14:02:53 +03:00
sql_sequence MDEV-36280 ALTER TABLE with DEFAULT NEXTVAL(sequence) fails due to 2025-06-03 13:51:55 +02:00
storage_engine
stress MDEV-34453 Trying to read 16384 bytes at 70368744161280 outside the bounds of the file: ./ibdata1 2024-09-20 20:26:43 +05:30
sys_vars MDEV-34388 default stack size under MSAN needs increasing 2025-05-28 16:30:56 +10:00
sysschema Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
unit
vcol MDEV-29155 CREATE OR REPLACE with self-referencing CHECK hangs 2025-05-29 12:34:07 +03:00
versioning MDEV-36817 Server crashes in do_mark_index_columns instead of 2025-05-23 14:46:34 +03:00
wsrep Merge branch '10.5' into '10.6' 2025-04-02 04:43:24 +02:00