mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge dator5.(none):/home/pappa/clean-mysql-5.1
into dator5.(none):/home/pappa/bug17138
This commit is contained in:
@ -541,13 +541,14 @@ int mysql_update(THD *thd,
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (!ignore || error != HA_ERR_FOUND_DUPP_KEY)
|
||||
else if (!ignore ||
|
||||
table->file->cannot_ignore_error(error, HA_CHECK_DUPP_KEY))
|
||||
{
|
||||
/*
|
||||
If (ignore && error == HA_ERR_FOUND_DUPP_KEY) we don't have to
|
||||
If (ignore && error is ignorable) we don't have to
|
||||
do anything; otherwise...
|
||||
*/
|
||||
if (error != HA_ERR_FOUND_DUPP_KEY)
|
||||
if (table->file->cannot_ignore_error(error, HA_CHECK_DUPP_KEY))
|
||||
thd->fatal_error(); /* Other handler errors are fatal */
|
||||
table->file->print_error(error,MYF(0));
|
||||
error= 1;
|
||||
@ -1422,13 +1423,14 @@ bool multi_update::send_data(List<Item> ¬_used_values)
|
||||
table->record[0])))
|
||||
{
|
||||
updated--;
|
||||
if (!ignore || error != HA_ERR_FOUND_DUPP_KEY)
|
||||
if (!ignore ||
|
||||
table->file->cannot_ignore_error(error, HA_CHECK_DUPP_KEY))
|
||||
{
|
||||
/*
|
||||
If (ignore && error == HA_ERR_FOUND_DUPP_KEY) we don't have to
|
||||
If (ignore && error == is ignorable) we don't have to
|
||||
do anything; otherwise...
|
||||
*/
|
||||
if (error != HA_ERR_FOUND_DUPP_KEY)
|
||||
if (table->file->cannot_ignore_error(error, HA_CHECK_DUPP_KEY))
|
||||
thd->fatal_error(); /* Other handler errors are fatal */
|
||||
table->file->print_error(error,MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
@ -1457,8 +1459,7 @@ bool multi_update::send_data(List<Item> ¬_used_values)
|
||||
/* Write row, ignoring duplicated updates to a row */
|
||||
if ((error= tmp_table->file->ha_write_row(tmp_table->record[0])))
|
||||
{
|
||||
if (error != HA_ERR_FOUND_DUPP_KEY &&
|
||||
error != HA_ERR_FOUND_DUPP_UNIQUE &&
|
||||
if (tmp_table->file->cannot_ignore_error(error, HA_CHECK_DUPP) &&
|
||||
create_myisam_from_heap(thd, tmp_table,
|
||||
tmp_table_param + offset, error, 1))
|
||||
{
|
||||
@ -1581,7 +1582,8 @@ int multi_update::do_updates(bool from_send_error)
|
||||
if ((local_error=table->file->ha_update_row(table->record[1],
|
||||
table->record[0])))
|
||||
{
|
||||
if (!ignore || local_error != HA_ERR_FOUND_DUPP_KEY)
|
||||
if (!ignore ||
|
||||
table->file->cannot_ignore_error(local_error, HA_CHECK_DUPP_KEY))
|
||||
goto err;
|
||||
}
|
||||
updated++;
|
||||
|
Reference in New Issue
Block a user