diff options
author | unknown <svoj@mysql.com/april.(none)> | 2006-10-05 18:23:53 +0500 |
---|---|---|
committer | unknown <svoj@mysql.com/april.(none)> | 2006-10-05 18:23:53 +0500 |
commit | 2268afedea366951d1f4ac10d1aa8394fb2b5b69 (patch) | |
tree | 817e8e2f7ddc2a3ab3694e3dab6b61c8c188b68b /sql/sql_update.cc | |
parent | 186573b3d6301532b5d5fa9b470335e19f49769c (diff) | |
download | mariadb-git-2268afedea366951d1f4ac10d1aa8394fb2b5b69.tar.gz |
BUG#21381 - Engine not notified about multi-table UPDATE IGNORE
Though this is not storage engine specific problem, I was able to
repeat this problem with BDB and NDB engines only. That was the
reason to add a test case into ndb_update.test. As a result
different bad things could happen.
BDB has removed duplicate rows which is not expected.
NDB returns an error.
For multi table update notify storage engine about UPDATE IGNORE
as it is done in single table UPDATE.
mysql-test/r/ndb_update.result:
A test case for bug#21381.
mysql-test/t/ndb_update.test:
A test case for bug#21381.
sql/sql_update.cc:
For multi table update notify storage engine about UPDATE IGNORE
as it is done in single table UPDATE.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index af4ba8025f9..6742fbad5c4 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -901,6 +901,8 @@ multi_update::initialize_tables(JOIN *join) List<Item> temp_fields= *fields_for_table[cnt]; ORDER group; + if (ignore) + table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); if (table == main_table) // First table in join { if (safe_update_on_fly(join->join_tab, &temp_fields)) @@ -1007,7 +1009,11 @@ multi_update::~multi_update() { TABLE_LIST *table; for (table= update_tables ; table; table= table->next) + { table->table->no_keyread= table->table->no_cache= 0; + if (ignore) + table->table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); + } if (tmp_tables) { |