summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-16 10:05:19 +0100
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-16 10:05:19 +0100
commit2ef19bdcc420d090d0bed822a884eef40cd347a9 (patch)
tree7bb909d13afe24120327ea8c3d6aedfc42610685 /sql/sql_insert.cc
parent294f3865cd5ca119dbc516e814a1594e2f8c1886 (diff)
parentb4b3c996af688aabb0001dbbf925084c46858fa7 (diff)
downloadmariadb-git-2ef19bdcc420d090d0bed822a884eef40cd347a9.tar.gz
Merge from mysql-5.5-bugteam to mysql-5.5-runtime
No conflicts
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 860a5b8941a..f2fcd2ea4f4 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3515,6 +3515,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);
@@ -4058,7 +4061,7 @@ bool select_create::send_eof()
{
bool tmp=select_insert::send_eof();
if (tmp)
- abort();
+ abort_result_set();
else
{
/*
@@ -4090,7 +4093,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.