mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
5.5 merge
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011 Monty Program Ab
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -529,7 +529,10 @@ int mysql_update(THD *thd,
|
||||
|
||||
/* If quick select is used, initialize it before retrieving rows. */
|
||||
if (select && select->quick && select->quick->reset())
|
||||
{
|
||||
close_cached_file(&tempfile);
|
||||
goto err;
|
||||
}
|
||||
table->file->try_semi_consistent_read(1);
|
||||
|
||||
/*
|
||||
@ -581,13 +584,18 @@ int mysql_update(THD *thd,
|
||||
}
|
||||
else
|
||||
{
|
||||
table->file->unlock_row();
|
||||
/*
|
||||
Don't try unlocking the row if skip_record reported an error since in
|
||||
this case the transaction might have been rolled back already.
|
||||
*/
|
||||
if (error < 0)
|
||||
{
|
||||
/* Fatal error from select->skip_record() */
|
||||
error= 1;
|
||||
break;
|
||||
}
|
||||
else
|
||||
table->file->unlock_row();
|
||||
}
|
||||
}
|
||||
if (thd->killed && !error)
|
||||
@ -830,8 +838,17 @@ int mysql_update(THD *thd,
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
/*
|
||||
Don't try unlocking the row if skip_record reported an error since in
|
||||
this case the transaction might have been rolled back already.
|
||||
*/
|
||||
else if (!thd->is_error())
|
||||
table->file->unlock_row();
|
||||
else
|
||||
{
|
||||
error= 1;
|
||||
break;
|
||||
}
|
||||
thd->warning_info->inc_current_row_for_warning();
|
||||
if (thd->is_error())
|
||||
{
|
||||
@ -2000,7 +2017,7 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
||||
create_internal_tmp_table_from_heap(thd, tmp_table,
|
||||
tmp_table_param[offset].start_recinfo,
|
||||
&tmp_table_param[offset].recinfo,
|
||||
error, 1))
|
||||
error, 1, NULL))
|
||||
{
|
||||
do_update= 0;
|
||||
DBUG_RETURN(1); // Not a table_is_full error
|
||||
|
Reference in New Issue
Block a user