diff options
author | evgen@moonbone.local <> | 2005-12-02 18:42:05 +0300 |
---|---|---|
committer | evgen@moonbone.local <> | 2005-12-02 18:42:05 +0300 |
commit | 151350536c231844ab10d5c07227c12823f4737a (patch) | |
tree | eb5e7ffe5e52551e7e886c25fc7850dc39bc8575 /sql/sql_update.cc | |
parent | 00d95a8bea72eacef6264e1168783d9ecc26b8be (diff) | |
parent | 3f72e7645f93454ed34cbd8b0ca9cdbae05a59d0 (diff) | |
download | mariadb-git-151350536c231844ab10d5c07227c12823f4737a.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/15028-bug-4.1-mysql
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index cb8064bef87..05e13c64aa7 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1082,22 +1082,23 @@ bool multi_update::send_data(List<Item> ¬_used_values) int error; TABLE *tmp_table= tmp_tables[offset]; fill_record(tmp_table->field+1, *values_for_table[offset], 1); - found++; /* Store pointer to row */ memcpy((char*) tmp_table->field[0]->ptr, (char*) table->file->ref, table->file->ref_length); /* Write row, ignoring duplicated updates to a row */ - if ((error= tmp_table->file->write_row(tmp_table->record[0])) && - (error != HA_ERR_FOUND_DUPP_KEY && - error != HA_ERR_FOUND_DUPP_UNIQUE)) + if (error= tmp_table->file->write_row(tmp_table->record[0])) { - if (create_myisam_from_heap(thd, tmp_table, tmp_table_param + offset, - error, 1)) + if (error != HA_ERR_FOUND_DUPP_KEY && + error != HA_ERR_FOUND_DUPP_UNIQUE && + create_myisam_from_heap(thd, tmp_table, + tmp_table_param + offset, error, 1)) { do_update=0; DBUG_RETURN(1); // Not a table_is_full error } } + else + found++; } } DBUG_RETURN(0); |