summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorpem@mysql.com <>2005-11-28 20:14:12 +0100
committerpem@mysql.com <>2005-11-28 20:14:12 +0100
commitb2a9961abfb6b67ced064f5f1cab416e9b04ddce (patch)
tree0ba4502a6a4c3cdf74957b0ba578ccf99236f07b /sql/sql_update.cc
parentc171f8c6c64a57f391ffe64beb75fe554d096c2c (diff)
parentba8d1f134ad70e715af9ea3da4a98a62de2d5d9b (diff)
downloadmariadb-git-b2a9961abfb6b67ced064f5f1cab416e9b04ddce.tar.gz
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/usr/home/pem/mysql-5.1-new
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index b0d35407eef..79e6a4766a5 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -516,7 +516,12 @@ int mysql_update(THD *thd,
}
else if (!ignore || error != HA_ERR_FOUND_DUPP_KEY)
{
- thd->fatal_error(); // Force error message
+ /*
+ If (ignore && error == HA_ERR_FOUND_DUPP_KEY) we don't have to
+ do anything; otherwise...
+ */
+ if (error != HA_ERR_FOUND_DUPP_KEY)
+ thd->fatal_error(); /* Other handler errors are fatal */
table->file->print_error(error,MYF(0));
error= 1;
break;
@@ -1365,7 +1370,12 @@ bool multi_update::send_data(List<Item> &not_used_values)
updated--;
if (!ignore || error != HA_ERR_FOUND_DUPP_KEY)
{
- thd->fatal_error(); // Force error message
+ /*
+ If (ignore && error == HA_ERR_FOUND_DUPP_KEY) we don't have to
+ do anything; otherwise...
+ */
+ if (error != HA_ERR_FOUND_DUPP_KEY)
+ thd->fatal_error(); /* Other handler errors are fatal */
table->file->print_error(error,MYF(0));
DBUG_RETURN(1);
}