diff options
author | ingo@mysql.com <> | 2005-12-07 19:52:26 +0100 |
---|---|---|
committer | ingo@mysql.com <> | 2005-12-07 19:52:26 +0100 |
commit | 5aa315e23a86dc5d376df09a11654799a7a80843 (patch) | |
tree | 08b2239db39cadbbb81f584e0abeac0bf7993598 /sql/sql_update.cc | |
parent | 7ce92291f039f6ebec328205701da59603c21c69 (diff) | |
download | mariadb-git-5aa315e23a86dc5d376df09a11654799a7a80843.tar.gz |
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
INSERT ... SELECT with the same table on both sides (hidden
below a MERGE table) does now work by buffering the select result.
The duplicate detection works now after open_and_lock_tables()
on the locks.
I did not find a test case that failed without the change in
sql_update.cc. I made the change anyway as it should in theory
fix a possible MERGE table problem with multi-table update.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 05e13c64aa7..d69a6b7cdd1 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -854,8 +854,7 @@ int multi_update::prepare(List<Item> ¬_used_values, { TABLE *table=table_ref->table; if (!(tables_to_update & table->map) && - find_real_table_in_list(update_tables, table_ref->db, - table_ref->real_name)) + mysql_lock_have_duplicate(thd, table, update_tables)) table->no_cache= 1; // Disable row cache } DBUG_RETURN(thd->is_fatal_error != 0); |