diff options
author | unknown <timour@askmonty.org> | 2010-09-05 18:43:47 +0300 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2010-09-05 18:43:47 +0300 |
commit | 18ad3bdc2fa3bbe1bfd7e433adb0bc6b3dbce8c8 (patch) | |
tree | 6c257aff7c14aa611fc2a7f76149dc830c7ed9e8 /sql/sql_delete.cc | |
parent | aa195b25704b4e67423654422ce0b601b54f809d (diff) | |
download | mariadb-git-18ad3bdc2fa3bbe1bfd7e433adb0bc6b3dbce8c8.tar.gz |
MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation
Fixes for multiple problems/bugs/test failures that resulted from moving
subquery optimization from the execution phase to the optimization phase.
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 ddb6af97865..862d3326c2a 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) |