summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 12005d4ee18..25647060784 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -353,8 +353,7 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
table_alias_charset->strnncoll(key, 6, "mysql", 6) == 0)
share->not_usable_by_query_cache= 1;
- share->stats_cb=
- new Shared_ptr<TABLE_STATISTICS_CB>(new TABLE_STATISTICS_CB);
+ share->stats_cb.reset(new TABLE_STATISTICS_CB);
memcpy((char*) &share->mem_root, (char*) &mem_root, sizeof(mem_root));
mysql_mutex_init(key_TABLE_SHARE_LOCK_share,
@@ -432,7 +431,7 @@ void init_tmp_table_share(THD *thd, TABLE_SHARE *share, const char *key,
share->frm_version= FRM_VER_CURRENT;
share->not_usable_by_query_cache= 1;
share->can_do_row_logging= 0; // No row logging
- share->stats_cb= new Shared_ptr<TABLE_STATISTICS_CB>(new TABLE_STATISTICS_CB);
+ share->stats_cb.reset(new TABLE_STATISTICS_CB);
/*
table_map_id is also used for MERGE tables to suppress repeated
@@ -465,8 +464,9 @@ void TABLE_SHARE::destroy()
delete sequence;
sequence= NULL;
delete_stat_values_for_table_share(this);
- delete stats_cb;
- stats_cb= NULL;
+ // OLEGS: delete stats_cb;
+ //stats_cb= NULL;
+ stats_cb.reset();
/* The mutexes are initialized only for shares that are part of the TDC */
if (tmp_table == NO_TMP_TABLE)