diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-10-01 14:16:00 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2010-10-01 14:16:00 +0200 |
commit | acc1b32675b38738111cd877c5cf172e1e279a96 (patch) | |
tree | 5ff0c607ca1505087ef507947fbd4bfc4d931a88 /sql/table.cc | |
parent | 029657be0ef0a2530793a55f0f00401a3cc32122 (diff) | |
parent | cfcf51b719b73c3dd5b854b14dc4829f3a5b7650 (diff) | |
download | mariadb-git-acc1b32675b38738111cd877c5cf172e1e279a96.tar.gz |
Manual merge of bug#51851 from mysql-5.1-bugteam into mysql-5.5-bugteam
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc index e84991912a4..cf6eeaf1afb 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -426,6 +426,18 @@ void TABLE_SHARE::destroy() info_it->flags= 0; } } + if (ha_data_destroy) + { + ha_data_destroy(ha_data); + ha_data_destroy= NULL; + } +#ifdef WITH_PARTITION_STORAGE_ENGINE + if (ha_part_data_destroy) + { + ha_part_data_destroy(ha_part_data); + ha_part_data_destroy= NULL; + } +#endif /* WITH_PARTITION_STORAGE_ENGINE */ /* Make a copy since the share is allocated in its own root, and free_root() updates its argument after freeing the memory. @@ -1704,11 +1716,17 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, delete handler_file; my_hash_free(&share->name_hash); if (share->ha_data_destroy) + { share->ha_data_destroy(share->ha_data); + share->ha_data_destroy= NULL; + } #ifdef WITH_PARTITION_STORAGE_ENGINE if (share->ha_part_data_destroy) + { share->ha_part_data_destroy(share->ha_part_data); -#endif + share->ha_data_destroy= NULL; + } +#endif /* WITH_PARTITION_STORAGE_ENGINE */ open_table_error(share, error, share->open_errno, errarg); DBUG_RETURN(error); |