summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2015-02-11 01:26:50 +0100
committerunknown <sanja@askmonty.org>2015-02-11 01:26:50 +0100
commitc233d6e120e20ea39dc7b9eac4cef264befc3cd0 (patch)
treef3b4f22da053dd507e6cca358e91877211d54acf /sql/sql_base.cc
parentcfb7d5d78a8aa6a683cd7a2f745d98ecfaca0100 (diff)
downloadmariadb-git-c233d6e120e20ea39dc7b9eac4cef264befc3cd0.tar.gz
MDEV-7260: Crash in get_best_combination when executing multi-table UPDATE with nested views
Do not use merge_for_insert for commands which use SELECT because optimizer can't work with such tables. Fixes which makes multi-delete working with normally merged views.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 90a12eb366d..3c36c2b514a 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2028,6 +2028,9 @@ unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
bool check_alias)
{
TABLE_LIST *dup;
+
+ table= table->find_table_for_update();
+
if (table->table && table->table->file->ht->db_type == DB_TYPE_MRG_MYISAM)
{
TABLE_LIST *child;