diff options
author | unknown <timour@askmonty.org> | 2010-11-05 14:42:58 +0200 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2010-11-05 14:42:58 +0200 |
commit | bc7369b74b52cde8aa4a74102178838b214c0ee3 (patch) | |
tree | 487833e19157a719f37e3cd1cffcabc66c19d61c /sql/sql_delete.cc | |
parent | 2dc2098e5989cd92cf6d90b66324c37bc105d5ad (diff) | |
parent | 9f2bddbd80fae92840c2db07b75968e816adc213 (diff) | |
download | mariadb-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_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 5564d628594..9d5f99a57ec 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -92,6 +92,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, } } + /* Apply the IN=>EXISTS transformation to all subqueries and optimize them. */ + if (select_lex->optimize_unflattened_subqueries()) + DBUG_RETURN(TRUE); + const_cond= (!conds || conds->const_item()); safe_update=test(thd->options & OPTION_SAFE_UPDATES); if (safe_update && const_cond) |