Fixed BUG#13729 Stored procedures: packet error after exception handled

Don't set thd->is_fatal_error in sql_update for duplicate key errors.
This commit is contained in:
pem@mysql.com 2005-11-23 11:56:53 +01:00
commit 0411412403
5 changed files with 177 additions and 2 deletions

View file

@ -465,7 +465,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;
@ -1259,7 +1264,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);
}