summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@oracle.com>2010-11-16 06:59:26 +0100
committerMarc Alff <marc.alff@oracle.com>2010-11-16 06:59:26 +0100
commitb4b3c996af688aabb0001dbbf925084c46858fa7 (patch)
tree106839bfb979ecf2e65809a2f75fe34ff4d717c9 /sql/sql_insert.cc
parentd47af174be567a584f8cedc2de62e8cab772c85e (diff)
parent089b5769d3ae42f6bbf5dbd7be5647f042cf47db (diff)
downloadmariadb-git-b4b3c996af688aabb0001dbbf925084c46858fa7.tar.gz
Local merge
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 1f8da3fab5c..a81c9ae15a0 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3506,6 +3506,9 @@ bool select_insert::send_eof()
error= (thd->locked_tables_mode <= LTM_LOCK_TABLES ?
table->file->ha_end_bulk_insert() : 0);
+ if (!error && thd->is_error())
+ error= thd->stmt_da->sql_errno();
+
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
@@ -4049,7 +4052,7 @@ bool select_create::send_eof()
{
bool tmp=select_insert::send_eof();
if (tmp)
- abort();
+ abort_result_set();
else
{
/*
@@ -4081,7 +4084,7 @@ void select_create::abort_result_set()
DBUG_ENTER("select_create::abort_result_set");
/*
- In select_insert::abort() we roll back the statement, including
+ In select_insert::abort_result_set() we roll back the statement, including
truncating the transaction cache of the binary log. To do this, we
pretend that the statement is transactional, even though it might
be the case that it was not.