summaryrefslogtreecommitdiff
path: root/sql/sql_rename.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-05-24 18:56:33 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2018-05-24 18:57:52 +0300
commit494c981d232678a3ba73abbe1502ddb0f95efcdc (patch)
treed01f70d42f4928906f20c7672dc0cf6538e1647e /sql/sql_rename.cc
parent72a8d29e00d4deec7c836228b54e19fa35ab7ad7 (diff)
parentbfed1bfe28980d3b1404f99a44712242a5108ef5 (diff)
downloadmariadb-git-494c981d232678a3ba73abbe1502ddb0f95efcdc.tar.gz
Merge remote-tracking branch 'origin/10.1' into 10.2
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r--sql/sql_rename.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index 1588644f0e1..4e576602a1a 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -221,7 +221,7 @@ do_rename_temporary(THD *thd, TABLE_LIST *ren_table, TABLE_LIST *new_table,
new_alias= (lower_case_table_names == 2) ? new_table->alias :
new_table->table_name;
- if (is_temporary_table(new_table))
+ if (thd->find_temporary_table(new_table, THD::TMP_TABLE_ANY))
{
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias);
DBUG_RETURN(1); // This can't be skipped