mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-23446 goto error cleanup
This commit is contained in:
@@ -2350,10 +2350,10 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
|||||||
{
|
{
|
||||||
TABLE_LIST *cur_table;
|
TABLE_LIST *cur_table;
|
||||||
DBUG_ENTER("multi_update::send_data");
|
DBUG_ENTER("multi_update::send_data");
|
||||||
int error= 0;
|
|
||||||
|
|
||||||
for (cur_table= update_tables; cur_table; cur_table= cur_table->next_local)
|
for (cur_table= update_tables; cur_table; cur_table= cur_table->next_local)
|
||||||
{
|
{
|
||||||
|
int error= 0;
|
||||||
TABLE *table= cur_table->table;
|
TABLE *table= cur_table->table;
|
||||||
uint offset= cur_table->shared;
|
uint offset= cur_table->shared;
|
||||||
/*
|
/*
|
||||||
@@ -2423,21 +2423,7 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
|||||||
updated--;
|
updated--;
|
||||||
if (!ignore ||
|
if (!ignore ||
|
||||||
table->file->is_fatal_error(error, HA_CHECK_ALL))
|
table->file->is_fatal_error(error, HA_CHECK_ALL))
|
||||||
{
|
goto error;
|
||||||
error:
|
|
||||||
/*
|
|
||||||
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_ALL))
|
|
||||||
flags|= ME_FATALERROR; /* Other handler errors are fatal */
|
|
||||||
|
|
||||||
prepare_record_for_error_message(error, table);
|
|
||||||
table->file->print_error(error,MYF(flags));
|
|
||||||
DBUG_RETURN(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2513,7 +2499,22 @@ error:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
continue;
|
||||||
|
error:
|
||||||
|
DBUG_ASSERT(error > 0);
|
||||||
|
/*
|
||||||
|
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_ALL))
|
||||||
|
flags|= ME_FATALERROR; /* Other handler errors are fatal */
|
||||||
|
|
||||||
|
prepare_record_for_error_message(error, table);
|
||||||
|
table->file->print_error(error,MYF(flags));
|
||||||
|
DBUG_RETURN(1);
|
||||||
|
} // for (cur_table)
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user