diff options
author | unknown <bell@sanja.is.com.ua> | 2004-02-01 20:07:44 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-02-01 20:07:44 +0200 |
commit | 1f739ca45eb009de8dadd4503374bc4a5c6bf5c0 (patch) | |
tree | d50de3f64cb91f76d133744d99eca3afb6493c01 /sql/sql_derived.cc | |
parent | 00b2168b8c4f41f48e6de8e2fec46ace253810f9 (diff) | |
download | mariadb-git-1f739ca45eb009de8dadd4503374bc4a5c6bf5c0.tar.gz |
make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
(BUG#2120 sfter merge)
mysql-test/r/derived.result:
correct results of derived tble EXPLAIN
test of "Using Index" with derived tables
mysql-test/t/derived.test:
test of "Using Index" with derived tables
sql/mysql_priv.h:
way to force derived table save JOIN after execution
sql/sql_derived.cc:
way to force derived table save JOIN after execution
sql/sql_lex.h:
way to force derived table save JOIN after execution
sql/sql_select.cc:
make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 8fa5694714c..a307b59b525 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -62,6 +62,15 @@ mysql_handle_derived(LEX *lex) return 1; } } + if (lex->describe) + { + /* + Force join->join_tmp creation, because we will use this JOIN + twice for EXPLAIN and we have to have unchanged join for EXPLAINing + */ + sl->uncacheable|= UNCACHEABLE_EXPLAIN; + sl->master_unit()->uncacheable|= UNCACHEABLE_EXPLAIN; + } } } return 0; |