summaryrefslogtreecommitdiff
path: root/sql/sql_rename.cc
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-11 01:58:13 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-11 01:58:13 -0700
commitbea4ab9bb65f6ff576b9b71011c5a8f22baa164a (patch)
tree5d91d6cc01f82639588f2c17fbb5289637567684 /sql/sql_rename.cc
parentc082955f0676efe069f30384102ba7807b49dee6 (diff)
parent376cf4275f28f6b8167eaf19b2c66dee41fbc5c5 (diff)
downloadmariadb-git-bea4ab9bb65f6ff576b9b71011c5a8f22baa164a.tar.gz
Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marc
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r--sql/sql_rename.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index 1dee391fa8b..18ec7f76032 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -34,6 +34,7 @@ static TABLE_LIST *reverse_table_list(TABLE_LIST *table_list);
bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
{
bool error= 1;
+ bool binlog_error= 0;
TABLE_LIST *ren_table= 0;
int to_table;
char *rename_log_table[2]= {NULL, NULL};
@@ -174,11 +175,11 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
*/
mysql_mutex_unlock(&LOCK_open);
- /* Lets hope this doesn't fail as the result will be messy */
if (!silent && !error)
{
- write_bin_log(thd, TRUE, thd->query(), thd->query_length());
- my_ok(thd);
+ binlog_error= write_bin_log(thd, TRUE, thd->query(), thd->query_length());
+ if (!binlog_error)
+ my_ok(thd);
}
if (!error)
@@ -190,7 +191,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
err:
start_waiting_global_read_lock(thd);
- DBUG_RETURN(error);
+ DBUG_RETURN(error || binlog_error);
}