diff options
author | Oleg Smirnov <olernov@gmail.com> | 2023-01-21 21:01:35 +0700 |
---|---|---|
committer | Oleg Smirnov <olernov@gmail.com> | 2023-01-30 18:40:53 +0700 |
commit | 855c95e2b5742788f3252ddc1c0ebea60c53252a (patch) | |
tree | 4180c509b53692ba23076f81d510e266e88808e0 /sql/table.cc | |
parent | 0f695b77a1b13d518b197e0b95f00c86d53401d9 (diff) | |
download | mariadb-git-bb-10.5-MDEV-29693.tar.gz |
MDEV-29693 Fix review commentsbb-10.5-MDEV-29693
Part2. Get rid of virtual functions in Shared_ptr
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 10 |
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) |