1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

10.0-base merge

This commit is contained in:
Sergei Golubchik
2013-12-16 13:02:21 +01:00
1367 changed files with 82358 additions and 55472 deletions

View File

@ -3410,6 +3410,9 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond)
if (table_records == 0)
DBUG_RETURN(FALSE);
if (table->pos_in_table_list->schema_table)
DBUG_RETURN(FALSE);
if (thd->variables.optimizer_use_condition_selectivity > 2 &&
!bitmap_is_clear_all(used_fields))
@ -5360,8 +5363,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);