summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2010-11-05 14:42:58 +0200
committerunknown <timour@askmonty.org>2010-11-05 14:42:58 +0200
commitbc7369b74b52cde8aa4a74102178838b214c0ee3 (patch)
tree487833e19157a719f37e3cd1cffcabc66c19d61c /sql/sql_update.cc
parent2dc2098e5989cd92cf6d90b66324c37bc105d5ad (diff)
parent9f2bddbd80fae92840c2db07b75968e816adc213 (diff)
downloadmariadb-git-bc7369b74b52cde8aa4a74102178838b214c0ee3.tar.gz
MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation
Merge 5.3-mwl89 into 5.3 main. There is one remaining test failure in this merge: innodb_mysql_lock2. All other tests have been checked to deliver the same results/explains as 5.3-mwl89, including the few remaining wrong results.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index acdf262f977..99dd032dd78 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -290,6 +290,10 @@ int mysql_update(THD *thd,
DBUG_RETURN(1); /* purecov: inspected */
}
+ /* Apply the IN=>EXISTS transformation to all subqueries and optimize them. */
+ if (select_lex->optimize_unflattened_subqueries())
+ DBUG_RETURN(TRUE);
+
if (select_lex->inner_refs_list.elements &&
fix_inner_refs(thd, all_fields, select_lex, select_lex->ref_pointer_array))
DBUG_RETURN(1);