summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2017-12-26 14:38:45 +0400
committerSergey Vojtovich <svoj@mariadb.org>2018-10-16 13:24:15 +0400
commitbebe24b03b859d3d01b0bd56356047531a26fac4 (patch)
tree9acd814ea1c8035d7896fe4379e7fc130db02111 /sql/sql_table.cc
parent1dacd5f299be63b8dea8f6ff802739abba96b4e1 (diff)
downloadmariadb-git-bebe24b03b859d3d01b0bd56356047531a26fac4.tar.gz
MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed in
Locked_tables_list::unlock_locked_tables Similarly to regular DROP TABLE, don't leave locked tables mode if CREATE OR REPLACE dropped temporary table but failed to cerate new one. The problem is that there's no track of which temporary table was "locked" by LOCK TABLES.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 5d20ad3967c..2302026b18b 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -5087,7 +5087,7 @@ err:
/* Write log if no error or if we already deleted a table */
if (!result || thd->log_current_statement)
{
- if (result && create_info->table_was_deleted)
+ if (result && create_info->table_was_deleted && pos_in_locked_tables)
{
/*
Possible locked table was dropped. We should remove meta data locks