1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-5069: Server crashes in SEL_ARG::increment_use_count with index_merge+index_merge_sort_union, FORCE INDEX

- Don't call incr_refs() is the merged SEL_ARG* is NULL.
This commit is contained in:
Sergey Petrunya
2013-11-19 13:47:35 +04:00
parent e730c91688
commit bc956c0046
3 changed files with 129 additions and 2 deletions

View File

@ -4925,8 +4925,10 @@ TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge,
bzero((*changed_tree)->keys,
sizeof((*changed_tree)->keys[0])*param->keys);
(*changed_tree)->keys_map.clear_all();
key->incr_refs();
(*tree)->keys[key_idx]->incr_refs();
if (key)
key->incr_refs();
if ((*tree)->keys[key_idx])
(*tree)->keys[key_idx]->incr_refs();
if (((*changed_tree)->keys[key_idx]=
key_or(param, key, (*tree)->keys[key_idx])))
(*changed_tree)->keys_map.set_bit(key_idx);