diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-26 15:28:07 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-26 15:28:07 +0100 |
commit | 0dc23679c867629ded5f9534d2ab6e8edf238aa0 (patch) | |
tree | 9cf966507fa2ef0fd17932b600d051df5f7bd2e5 /sql/opt_subselect.cc | |
parent | 6efa5efa7dd112b6ac2efdd84235a13cca51c4d4 (diff) | |
parent | 0b9a0a3517ca2b75655f3af5c372cf333d3d5fe2 (diff) | |
download | mariadb-git-0dc23679c867629ded5f9534d2ab6e8edf238aa0.tar.gz |
10.0-base merge
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 4079298f6c0..e00083c4b8b 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -5288,6 +5288,7 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list, if (!(*join_where)->fixed) (*join_where)->fix_fields(join->thd, join_where); } + table->table->maybe_null= MY_TEST(join->mixed_implicit_grouping); } if ((nested_join= table->nested_join)) @@ -5318,9 +5319,9 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list, through Item::cleanup() calls). */ -void cleanup_empty_jtbm_semi_joins(JOIN *join) +void cleanup_empty_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list) { - List_iterator<TABLE_LIST> li(*join->join_list); + List_iterator<TABLE_LIST> li(*join_list); TABLE_LIST *table; while ((table= li++)) { @@ -5332,6 +5333,10 @@ void cleanup_empty_jtbm_semi_joins(JOIN *join) table->table= NULL; } } + else if (table->nested_join && table->sj_subq_pred) + { + cleanup_empty_jtbm_semi_joins(join, &table->nested_join->join_list); + } } } |