diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-12 14:26:34 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-12 14:26:34 +0200 |
commit | b32bc70e340b5b0d8fcb9aa48b1b875f3f2f12dc (patch) | |
tree | 4edd8565c6eb0b1139cbb37c48f4d5f5a28798be /sql/temporary_tables.cc | |
parent | f010c90807da68487b1ce4c952588c6c3def2afd (diff) | |
parent | f72760df3390407c3cbe876e827818bc52849b71 (diff) | |
download | mariadb-git-b32bc70e340b5b0d8fcb9aa48b1b875f3f2f12dc.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'sql/temporary_tables.cc')
-rw-r--r-- | sql/temporary_tables.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc index 917a85e6c3b..2f980993fa1 100644 --- a/sql/temporary_tables.cc +++ b/sql/temporary_tables.cc @@ -504,6 +504,7 @@ bool THD::close_temporary_tables() /* Traverse the table list. */ while ((table= share->all_tmp_tables.pop_front())) { + table->file->extra(HA_EXTRA_PREPARE_FOR_DROP); free_temporary_table(table); } } @@ -588,9 +589,7 @@ bool THD::rename_temporary_table(TABLE *table, @return false Table was dropped true Error */ -bool THD::drop_temporary_table(TABLE *table, - bool *is_trans, - bool delete_table) +bool THD::drop_temporary_table(TABLE *table, bool *is_trans, bool delete_table) { DBUG_ENTER("THD::drop_temporary_table"); @@ -633,7 +632,8 @@ bool THD::drop_temporary_table(TABLE *table, parallel replication */ tab->in_use= this; - + if (delete_table) + tab->file->extra(HA_EXTRA_PREPARE_FOR_DROP); free_temporary_table(tab); } @@ -1433,8 +1433,7 @@ bool THD::log_events_and_free_tmp_shares() @return void */ -void THD::free_tmp_table_share(TMP_TABLE_SHARE *share, - bool delete_table) +void THD::free_tmp_table_share(TMP_TABLE_SHARE *share, bool delete_table) { DBUG_ENTER("THD::free_tmp_table_share"); |