mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 00:05:33 +02:00
BUG#9622, stage 2, work together with fix for BUG#12232:
added "nulls_ignored" index statistics collection method for MyISAM tables. (notification trigger: this is about BUG#9622). include/my_base.h: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method: Added SEARCH_RETURN_B_POS flag for ha_key_cmp() include/my_handler.h: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method: added ha_find_null() include/myisam.h: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method. myisam/mi_check.c: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method, added mi_collect_stats_*(), updated update_key_parts() to deal with all 3 methods. myisam/myisamchk.c: BUG#9622: Added nulls_ignored index statistics collection method for MyISAM myisam/myisamdef.h: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method. myisam/sort.c: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method. mysql-test/r/myisam.result: Testcase for BUG9622 mysql-test/t/myisam.test: Testcase for BUG9622 mysys/my_handler.c: BUG#9622: ha_key_cmp() now supports new SEARCH_RETURN_B_POS flag, added ha_find_null() sql/ha_myisam.cc: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method. sql/mysqld.cc: BUG#9622: Added MI_STATS_METHOD_IGNORE_NULLS statistics collection method.
This commit is contained in:
parent
0c16a7ccc7
commit
71fdef4d10
12 changed files with 375 additions and 31 deletions
|
|
@ -481,8 +481,12 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
|
|||
{
|
||||
share->state.key_map|=(ulonglong) 1 << sinfo->key;
|
||||
if (param->testflag & T_STATISTICS)
|
||||
update_key_parts(sinfo->keyinfo, rec_per_key_part,
|
||||
sinfo->unique, (ulonglong) info->state->records);
|
||||
update_key_parts(sinfo->keyinfo, rec_per_key_part, sinfo->unique,
|
||||
param->stats_method == MI_STATS_METHOD_IGNORE_NULLS?
|
||||
sinfo->notnull: NULL,
|
||||
(ulonglong) info->state->records);
|
||||
|
||||
|
||||
if (!sinfo->buffpek.elements)
|
||||
{
|
||||
if (param->testflag & T_VERBOSE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue