summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2013-04-03 18:51:29 +0400
committerSergey Petrunya <psergey@askmonty.org>2013-04-03 18:51:29 +0400
commit78683672707bad90169b68b4c5d8aadc0e895f3d (patch)
treec4e9de4dad68a9728c5bf606dc400fb1e6ddabfc /sql/opt_subselect.cc
parent599a1384af7d38e4319bd6258c6954750f5b9ba4 (diff)
parent763af1a8a3a894df7326303b062bc55121103cb0 (diff)
downloadmariadb-git-78683672707bad90169b68b4c5d8aadc0e895f3d.tar.gz
Merge 5.3 -> 5.5
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index dfe2ece76d9..c0a01dded35 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -1509,6 +1509,9 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
*/
parent_lex->leaf_tables.concat(&subq_lex->leaf_tables);
+ if (subq_lex->options & OPTION_SCHEMA_TABLE)
+ parent_lex->options |= OPTION_SCHEMA_TABLE;
+
/*
Same as above for next_local chain
(a theory: a next_local chain always starts with ::leaf_tables
@@ -1725,6 +1728,9 @@ static bool convert_subq_to_jtbm(JOIN *parent_join,
*/
parent_lex->leaf_tables.push_back(jtbm);
+ if (subq_pred->unit->first_select()->options & OPTION_SCHEMA_TABLE)
+ parent_lex->options |= OPTION_SCHEMA_TABLE;
+
/*
Same as above for TABLE_LIST::next_local chain
(a theory: a next_local chain always starts with ::leaf_tables