mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with disabled
keys Fixed that OPTIMIZE TABLE against MyISAM/Aria table may write uninitialized key root position for disabled keys.
This commit is contained in:
parent
3a50a8c9be
commit
80f6b22593
6 changed files with 46 additions and 8 deletions
|
|
@ -1944,10 +1944,8 @@ int mi_sort_index(HA_CHECK *param, register MI_INFO *info, char * name)
|
|||
for (key= 0,keyinfo= &share->keyinfo[0]; key < share->base.keys ;
|
||||
key++,keyinfo++)
|
||||
{
|
||||
if (! mi_is_key_active(info->s->state.key_map, key))
|
||||
continue;
|
||||
|
||||
if (share->state.key_root[key] != HA_OFFSET_ERROR)
|
||||
if (mi_is_key_active(info->s->state.key_map, key) &&
|
||||
share->state.key_root[key] != HA_OFFSET_ERROR)
|
||||
{
|
||||
index_pos[key]=param->new_file_pos; /* Write first block here */
|
||||
if (sort_one_index(param,info,keyinfo,share->state.key_root[key],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue