diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-08 17:26:06 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-08 17:26:06 -0400 |
commit | df9b4554b729aac895d699b2af5a5684b026a85a (patch) | |
tree | e6d0c4fd5d87ad333b1d6c5eb667598245f5fb3f /sql/sql_rename.cc | |
parent | 45ffbda79e22cdfb8841eaec3e81d689fbb5aaf2 (diff) | |
download | mariadb-git-df9b4554b729aac895d699b2af5a5684b026a85a.tar.gz |
MDEV-10216: Assertion `strcmp(share->unique_file_name,filename) ||
.. share->last_version' failed in myisam/mi_open.c:67: test_if_reopen
During the RENAME operation since the renamed temporary table is also
opened and added to myisam_open_list/maria_open_list, resetting the
last_version at the end of operation (HA_EXTRA_PREPARE_FOR_RENAME)
will cause an assertion failure when a subsequent query tries to open
an additional temporary table instance and thus attempts to reuse it
from the open table list.
This commit fixes the issue by skipping flush/close operations executed
toward the end of ALTER for temporary tables. It also enables a shortcut
for simple ALTERs (like rename, disable/enable keys) on temporary
tables.
As safety checks, added some assertions at code points that should not
be hit for temporary tables.
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r-- | sql/sql_rename.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 17b297f63bd..b312077898f 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -27,7 +27,6 @@ #include "sql_table.h" // build_table_filename #include "sql_view.h" // mysql_frm_type, mysql_rename_view #include "sql_trigger.h" -#include "lock.h" // MYSQL_OPEN_SKIP_TEMPORARY #include "sql_base.h" // tdc_remove_table, lock_table_names, #include "sql_handler.h" // mysql_ha_rm_tables #include "sql_statistics.h" |