diff options
author | He Zhenxing <zhenxing.he@sun.com> | 2009-11-21 12:48:54 +0800 |
---|---|---|
committer | He Zhenxing <zhenxing.he@sun.com> | 2009-11-21 12:48:54 +0800 |
commit | b9268fc8ea2a2090b94aee6b2cef3cdd4d7aadd2 (patch) | |
tree | 821dc823aee6fd653afed43cbcce9dc52330f984 /sql/sql_update.cc | |
parent | dd383cadec0fbfba626bba72051f2dc548171015 (diff) | |
parent | 34b11fb627df93e395158a27f48baa1c049ddf85 (diff) | |
download | mariadb-git-b9268fc8ea2a2090b94aee6b2cef3cdd4d7aadd2.tar.gz |
Auto merge
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 18 |
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> ¬_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: |