MDEV-19574 innodb_stats_method is not honored when innodb_stats_persistent=ON#4187
MDEV-19574 innodb_stats_method is not honored when innodb_stats_persistent=ON#4187Thirunarayanan wants to merge 1 commit into
Conversation
…stent=ON Problem: ======= InnoDB persistent statistics doesn't take innodb_stats_method variable while calculating n_diff_pfx for the n-prefix index columns. Solution: ========= InnoDB consider all nulls as different value when innodb_stats_method is set to NULLS_UNEQUAL and NULLS_IGNORED.
|
|
dr-m
left a comment
There was a problem hiding this comment.
The commit message mentions that a value is set to one AND another. It should clearly be OR.
I think that the commit message needs to emphasize that the contents of the statistics depends on the value of the parameter when the statistics were last recalculated. We have an informational column in the statistics tables. Could the used value of innodb_stats_method be written there?
| (srv_innodb_stats_method | ||
| > SRV_STATS_NULLS_EQUAL), |
There was a problem hiding this comment.
Instead of checking the value of the global variable in each iteration, I think that it would be better to evaluate this condition only once and pass it in a bool parameter to the affected functions.
|
This issue is being fixed in 10.11 branch. Check #4204 |
Description
Problem:
InnoDB persistent statistics doesn't take innodb_stats_method
variable while calculating n_diff_pfx for the n-prefix index columns.
Solution:
InnoDB consider all nulls as different value when innodb_stats_method is set to NULLS_UNEQUAL and NULLS_IGNORED.
Release Notes
InnoDB consider innodb_stats_method while calculating persistent statistics
How can this PR be tested?
./mtr innodb.innodb_stats_method
Basing the PR against the correct MariaDB version
mainbranch.PR quality check