mariadb/mysql-test/suite
Thirunarayanan Balathandayuthapani a157161d54 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. Added the new stat name like n_nonnull_fld01, n_nonull_fld02 etc
with stats description to indicate how many non-nulls value exist
for nth field of the index. This value is properly retrieved and
stored in index statistics in dict_stats_fetch_index_stats_step().

8. 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.
2026-02-10 16:01:18 +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 MDEV-38769: rollback on CREATE TEMPORARY TABLE ... SELECT errors 2026-02-06 14:24:16 +02:00
binlog_encryption cleanup: select ... into tests 2025-07-17 09:18:18 +02:00
client
compat MDEV-38451 SHOW FUNCTION CODE package_func crashes on the second execution 2026-01-13 15:37:08 +04:00
csv
encryption MDEV-37299 fixup: cmake -DPLUGIN_PERFSCHEMA=NO 2025-09-30 16:42:58 +03:00
engines MDEV-38506 fix the test 2026-01-26 10:01:31 +01:00
federated MDEV-29874: FederatedX error 10000 on multi-table UPDATE/DELETE 2025-10-22 15:35:54 +07:00
funcs_1 MDEV-38471 - funcs_1.processlist_val_no_prot fails sporadically 2026-01-23 20:49:53 +04:00
funcs_2 Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
galera MDEV-38399 : Galera test failure on galera_fk_truncate 2026-02-03 15:19:33 +02: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 MDEV-34124: Make sequences work with streaming replication 2025-11-25 13:01:26 +02:00
gcol MDEV-19574: innodb_stats_method ignored with persistent statistics 2026-02-10 16:01:18 +05:30
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 2026-02-10 16:01:18 +05:30
innodb_fts Merge branch '10.6' into 10.11 2026-01-28 14:22:20 +01:00
innodb_gis Merge 10.6 into 10.11 2026-01-02 11:06:05 +02:00
innodb_i_s
innodb_zip MDEV-37138: Innochecksum fails to handle doublewrite buffer and 2025-11-11 13:43:43 +05:30
jp
json MDEV-34081: View containing JSON_TABLE does not return JSON 2025-10-22 22:49:26 +05:30
large_tests
maria MDEV-38087 Unexpected error Unknown column '???' in 'GROUP BY' 2026-01-14 19:44:30 +01:00
mariabackup MDEV-38246 aria_read index failed on encrypted database during backup 2026-01-29 20:53:42 +01: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-38531 - perfschema.statement_digest_consumers2 fails sporadically 2026-01-13 03:28:00 +04:00
perfschema_stress
period Merge branch '10.6' into 10.11 2025-09-12 13:08:40 +02:00
plugins Merge branch '10.6' into 10.11 2026-01-28 14:22:20 +01:00
roles Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
rpl MDEV-25039 fixup: cmake -DPLUGIN_PERFSCHEMA=NO 2026-02-04 13:10:48 +02:00
s3 Merge branch '10.6' into 10.11 2025-06-04 14:09:23 +02:00
sql_sequence MDEV-33985 Server crashes at Item_func_nextval::val_int 2026-01-23 14:48:24 +03:00
storage_engine
stress
sys_vars Merge 10.6 into 10.11 2025-10-23 10:38:55 +03:00
sysschema MDEV-37979 sys.ps_setup_save does not restore SQL_LOG_BIN after error, causes replication discrepancy 2026-01-14 19:44:30 +01:00
unit
vcol Improvements for myisamchk 2025-09-04 18:08:39 +03:00
versioning MDEV-38710 Assertion is_lock_owner on error returning from auto-create in mysql_admin_table 2026-01-31 11:42:12 +01:00
wsrep Galera library 26.4.25 contains gcs protocol change 5-->6 2025-11-27 11:40:21 +02:00