diff options
author | unknown <sanja@montyprogram.com> | 2013-06-21 15:17:48 +0300 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2013-06-21 15:17:48 +0300 |
commit | 1f08a518589b79e9dd2897e6ebdb237bcc4c2221 (patch) | |
tree | 8a746b68f9e3c2ae40dfa9de7c033e44b61998cb /sql | |
parent | c46ce32cfbec0b3c21cb0e5b6bca91bd437130cf (diff) | |
download | mariadb-git-1f08a518589b79e9dd2897e6ebdb237bcc4c2221.tar.gz |
Case when we close temporary table which was not opened in its engine (ALTER TABLE) fixed.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_base.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index a2220a59470..e1a87138656 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2360,8 +2360,13 @@ void close_temporary(TABLE *table, bool free_share, bool delete_table) DBUG_PRINT("tmptable", ("closing table: '%s'.'%s'", table->s->db.str, table->s->table_name.str)); - /* in_use is not set for replication temporary tables during shutdown */ - if (table->in_use) + /* + in_use is not set for replication temporary tables during shutdown. + + table->file->get_table() could not be set for ALTER table + when we do not open it in engine. + */ + if (table->file->get_table() && table->in_use) { table->file->update_global_table_stats(); table->file->update_global_index_stats(); |