mariadb/mysql-test/suite
Thirunarayanan Balathandayuthapani 57cab3e3a2 MDEV-19574: innodb_stats_method ignored with persistent statistics
Problem:
========
When persistent statistics are enabled (innodb_stats_persistent=ON),
the innodb_stats_method setting was not being properly passed
through the statistics calculation chain. This caused NULL handling
to always use the default behavior, regardless of the
configured stats method.

The issue affected query optimization for queries involving
NULL values, as the statistics collection wasn't respecting
the user's preference for NULL value treatment
(NULLS_EQUAL, NULLS_UNEQUAL, or NULLS_IGNORED).

Solution:
========
1. Passed innodb_stats_method parameter through the
statistics calculation chain:
 - dict_stats_scan_page()
 - dict_stats_analyze_index_below_cur()
 - dict_stats_analyze_index_for_n_prefix()
 - dict_stats_analyze_index_level
 - dict_stats_analyze_index
 - dict_stats_update_persistent
 - dict_stats_save

2. Conditionally set n_non_null_key_vals based on the NULLS_IGNORED
method.

3. Introduced IndexLevelStats which is to collect statistics
at a specific B-tree level during index analysis

4. Introduced LeafPageStats which is to collect statistics
for leaf page analysis

5. IndexLevelStats, LeafPageStats replaces multiple individual
parameters in function signatures.

6. Add stats method name to stat_description in case of non
default innodb_stats_method variable value

7. When InnoDB scan the leaf page directly, assign leaf page
count as number of pages scanned in case of multi-level index.
For single page indexes, use 1. This change leads to multiple
changes in existing test case.
2025-10-20 23:38:57 +05:30
..
archive Merge branch '10.6' into '10.11' 2025-04-16 03:34:40 +02:00
atomic Merge branch '10.6' into 10.11 2025-04-26 10:47:03 +02:00
binlog Merge 10.6 into 10.11 2025-10-09 13:29:46 +03:00
binlog_encryption cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
client
compat Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
csv
encryption MDEV-37299 fixup: cmake -DPLUGIN_PERFSCHEMA=NO 2025-09-30 16:42:58 +03:00
engines MDEV-37375 engines/iuds suite fails with ps-protocol 2025-09-15 11:00:02 +02:00
federated cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
funcs_1 cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
funcs_2 Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
galera MDEV-30764 : Assertion `transaction.is_streaming()' failed in void wsrep::transaction::adopt(const wsrep::transaction&) 2025-10-17 17:21:13 +03:00
galera_3nodes MDEV-37816: galera tests failing with Table performance_schema.xxx doesn't exist 2025-10-09 16:01:09 +11:00
galera_3nodes_sr galera mtr tests: synchronization between branches and editions 2025-04-02 04:50:11 +02:00
galera_sr galera tests: synchronization between versions and editions 2025-08-14 17:04:40 +02:00
gcol cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
handler Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
heap Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
innodb MDEV-19574: innodb_stats_method ignored with persistent statistics 2025-10-20 23:38:57 +05:30
innodb_fts MDEV-35163 InnoDB persistent statistics fail to update after ALTER TABLE...ALGORITHM=COPY 2025-09-22 17:39:47 +05:30
innodb_gis Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
innodb_i_s
innodb_zip MDEV-37138: Innochecksum fails to handle doublewrite buffer and 2025-10-13 13:04:53 +05:30
jp
json MDEV-27898 CREATE VIEW AS SELECT FROM JSON_TABLE column requires global privileges 2025-10-16 10:24:29 +11:00
large_tests
maria Merge branch '10.6' into 10.11 2025-09-12 13:08:40 +02:00
mariabackup MDEV-37520 Failure to detect corruption during backups of Aria table 2025-09-04 18:08:39 +03:00
mtr/t Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
mtr2
multi_source MDEV-7611: create multi_source.mariadb-dump_slave 2025-07-10 18:31:36 -06:00
optimizer_unfixed_bugs
parts MDEV-37328 Assertion failure in make_empty_rec upon CONVERT PARTITION 2025-07-28 18:06:11 +02:00
perfschema MDEV-37705 main.lotofstack /main.sp-error fails in MSAN+Debug 2025-09-24 09:08:16 +10:00
perfschema_stress
period Merge branch '10.6' into 10.11 2025-09-12 13:08:40 +02:00
plugins Reproducible test case for MDEV-37434 2025-09-18 18:01:33 +02:00
roles Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
rpl Merge 10.6 into 10.11 2025-10-09 13:29:46 +03:00
s3 Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
sql_sequence Merge 10.6 into 10.11 2025-09-24 12:48:56 +03: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-37890 - sys_vars.thread_cache_size_func fails sporadically 2025-10-20 15:39:29 +04:00
sysschema MDEV-37083: Fixed type mismatch in sys views 2025-07-25 17:02:59 +05:30
unit
vcol Improvements for myisamchk 2025-09-04 18:08:39 +03:00
versioning MDEV-15990 versioning: don't allow changes in the past 2025-08-04 17:44:05 +02:00
wsrep MDEV-30418 : Setting wsrep_slave_threads causes thread hang 2025-09-26 15:33:56 +03:00