summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-11-21 12:48:54 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-11-21 12:48:54 +0800
commitb9268fc8ea2a2090b94aee6b2cef3cdd4d7aadd2 (patch)
tree821dc823aee6fd653afed43cbcce9dc52330f984 /sql/sql_update.cc
parentdd383cadec0fbfba626bba72051f2dc548171015 (diff)
parent34b11fb627df93e395158a27f48baa1c049ddf85 (diff)
downloadmariadb-git-b9268fc8ea2a2090b94aee6b2cef3cdd4d7aadd2.tar.gz
Auto merge
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 21d0243a403..798d68d6a00 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -662,11 +662,13 @@ int mysql_update(THD *thd,
If (ignore && error is ignorable) we don't have to
do anything; otherwise...
*/
+ myf flags= 0;
+
if (table->file->is_fatal_error(error, HA_CHECK_DUP_KEY))
- thd->fatal_error(); /* Other handler errors are fatal */
+ flags|= ME_FATALERROR; /* Other handler errors are fatal */
prepare_record_for_error_message(error, table);
- table->file->print_error(error,MYF(0));
+ table->file->print_error(error,MYF(flags));
error= 1;
break;
}
@@ -763,9 +765,8 @@ int mysql_update(THD *thd,
*/
{
/* purecov: begin inspected */
- thd->fatal_error();
prepare_record_for_error_message(loc_error, table);
- table->file->print_error(loc_error,MYF(0));
+ table->file->print_error(loc_error,MYF(ME_FATALERROR));
error= 1;
/* purecov: end */
}
@@ -1742,11 +1743,13 @@ bool multi_update::send_data(List<Item> &not_used_values)
If (ignore && error == is ignorable) we don't have to
do anything; otherwise...
*/
+ myf flags= 0;
+
if (table->file->is_fatal_error(error, HA_CHECK_DUP_KEY))
- thd->fatal_error(); /* Other handler errors are fatal */
+ flags|= ME_FATALERROR; /* Other handler errors are fatal */
prepare_record_for_error_message(error, table);
- table->file->print_error(error,MYF(0));
+ table->file->print_error(error,MYF(flags));
DBUG_RETURN(1);
}
}
@@ -2030,9 +2033,8 @@ int multi_update::do_updates()
err:
{
- thd->fatal_error();
prepare_record_for_error_message(local_error, table);
- table->file->print_error(local_error,MYF(0));
+ table->file->print_error(local_error,MYF(ME_FATALERROR));
}
err2: