summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
committerSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
commita3d80d952d7b99680ca4a3a89e128ecc0d490c10 (patch)
tree0d72ee69e037cdd09618ddb53652dd1b220890dc /sql/sql_insert.cc
parentec06ba24553d2d83b3a6a6bc4d8150910b01ee7c (diff)
parent966661c8cc75dd7d540a5fe40b4d893c40e91d26 (diff)
downloadmariadb-git-a3d80d952d7b99680ca4a3a89e128ecc0d490c10.tar.gz
merge with 5.1
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index ea138807122..f6549858a9d 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3924,6 +3924,17 @@ void select_create::abort()
if (table)
{
+ if (thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
+ thd->current_stmt_binlog_row_based &&
+ !(thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) &&
+ mysql_bin_log.is_open())
+ {
+ /*
+ This should be removed after BUG#47899.
+ */
+ mysql_bin_log.reset_gathered_updates(thd);
+ }
+
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
if (!create_info->table_existed)