1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-8716 - Obsolete sql_calloc() in favor of THD::calloc() and thd_calloc()

This commit is contained in:
Sergey Vojtovich
2015-11-18 23:54:01 +04:00
parent 0746a07708
commit 753d1f868c
10 changed files with 66 additions and 70 deletions

View File

@@ -1656,7 +1656,7 @@ public:
bool is_single_comp_pk;
Index_prefix_calc(TABLE *table, KEY *key_info)
Index_prefix_calc(THD *thd, TABLE *table, KEY *key_info)
: index_table(table), index_info(key_info)
{
uint i;
@@ -1691,7 +1691,8 @@ public:
break;
if (!(state->last_prefix=
new Cached_item_field(key_info->key_part[i].field)))
new (thd->mem_root) Cached_item_field(thd,
key_info->key_part[i].field)))
break;
state->entry_count= state->prefix_count= 0;
prefixes++;
@@ -2475,7 +2476,7 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index)
if (key_info->flags & HA_FULLTEXT)
DBUG_RETURN(rc);
Index_prefix_calc index_prefix_calc(table, key_info);
Index_prefix_calc index_prefix_calc(thd, table, key_info);
DEBUG_SYNC(table->in_use, "statistics_collection_start1");
DEBUG_SYNC(table->in_use, "statistics_collection_start2");