summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2014-09-11 23:50:31 +0300
committerMichael Widenius <monty@mariadb.org>2014-09-11 23:50:31 +0300
commitc6051a4beb80505b4d6ce689204886c9fce61282 (patch)
tree5ef2217ac4ce242038f7c95a0e980352fe4f9350 /sql/sql_table.cc
parent4a68817d8d5a095dee316211f62e2fddf19fb68d (diff)
parentc4f5326bb7bee1857d0cc6d5cdff1178e0854d00 (diff)
downloadmariadb-git-c6051a4beb80505b4d6ce689204886c9fce61282.tar.gz
Automatic merge
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index ca1290b2753..f4412512522 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -5029,7 +5029,10 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table,
*/
thd->locked_tables_list.add_back_last_deleted_lock(pos_in_locked_tables);
if (thd->locked_tables_list.reopen_tables(thd))
+ {
thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0);
+ result= 1;
+ }
else
{
TABLE *table= pos_in_locked_tables->table;
@@ -5292,6 +5295,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
if (res)
{
+ /* is_error() may be 0 if table existed and we generated a warning */
res= thd->is_error();
goto err;
}
@@ -5374,7 +5378,10 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
*/
thd->locked_tables_list.add_back_last_deleted_lock(pos_in_locked_tables);
if (thd->locked_tables_list.reopen_tables(thd))
+ {
thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0);
+ res= 1; // We got an error
+ }
else
{
/*