summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_check.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-06-11 20:20:35 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-11 20:20:35 +0200
commit810cf362eae28d4a096e0acea7efa67dd32aa05b (patch)
tree4f7b2f858e8a57022e790bcac6d88b5e3451ee0f /storage/myisam/mi_check.c
parenta99efc00a68fe2406343e63b67fc4ea58bed345a (diff)
parentd199a0ffb0aac86881ea2db7dd78bc07b438dc67 (diff)
downloadmariadb-git-810cf362eae28d4a096e0acea7efa67dd32aa05b.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'storage/myisam/mi_check.c')
-rw-r--r--storage/myisam/mi_check.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index b79d6c891f1..178fff6a204 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -1944,16 +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))
- {
- /* Since the key is not active, this should not be read, but we
- initialize it anyway to silence a Valgrind warn when passing that
- chunk of memory to pwrite(). */
- index_pos[key]= HA_OFFSET_ERROR;
- 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],