summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2002-12-18 19:00:00 +0200
committerSinisa@sinisa.nasamreza.org <>2002-12-18 19:00:00 +0200
commit5961bff59b30d4e8c334dc7b8a2b6308e9138588 (patch)
tree96d83582e1c00611c11e7e643719729653f3dc5d /sql
parente2e5d5986672928d6e01f2bb7815ec5a1bf7c374 (diff)
downloadmariadb-git-5961bff59b30d4e8c334dc7b8a2b6308e9138588.tar.gz
Fix for found rows in multi-table updates
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_update.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 8a349671c50..9817dcd2be5 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -614,7 +614,6 @@ bool multi_update::send_data(List<Item> &not_used_values)
TABLE_LIST *cur_table;
DBUG_ENTER("multi_update::send_data");
- found++;
for (cur_table= update_tables; cur_table ; cur_table= cur_table->next)
{
TABLE *table= cur_table->table;
@@ -630,6 +629,7 @@ bool multi_update::send_data(List<Item> &not_used_values)
store_record(table,1);
if (fill_record(*fields_for_table[offset], *values_for_table[offset]))
DBUG_RETURN(1);
+ found++;
if (compare_record(table, thd->query_id))
{
int error;
@@ -656,7 +656,7 @@ bool multi_update::send_data(List<Item> &not_used_values)
int error;
TABLE *tmp_table= tmp_tables[offset];
fill_record(tmp_table->field+1, *values_for_table[offset]);
-
+ found++;
/* Store pointer to row */
memcpy((char*) tmp_table->field[0]->ptr,
(char*) table->file->ref, table->file->ref_length);
@@ -754,7 +754,6 @@ int multi_update::do_updates(bool from_send_error)
continue; // May happen on dup key
goto err;
}
- found++;
if ((local_error= table->file->rnd_pos(table->record[0], ref_pos)))
goto err;
table->status|= STATUS_UPDATED;