summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2014-02-15 01:21:46 +0400
committerSergey Petrunya <psergey@askmonty.org>2014-02-15 01:21:46 +0400
commit8c9b2f3429fd385ded604ec048f1fcbd89c3a846 (patch)
treec114042bfa4eacc2c7afb3b54aba319fe11715f7 /sql/opt_subselect.cc
parent9d5731ef1b5a3f879d4234cddc694b629d823106 (diff)
downloadmariadb-git-8c9b2f3429fd385ded604ec048f1fcbd89c3a846.tar.gz
MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
- The problem was that JOIN::prepare() tried to set TABLE::maybe_null for a table in join. Non-merged semi-join tables 1) are present as join's base tables on second EXECUTE, but 2) do not yet have a TABLE object. Worked around the problem by putting mixed_implicit_grouping into JOIN object, and then passing it to JTBM tables in setup_jtbm_semi_joins().
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 60eee3fd48f..f19d9550f68 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -5204,6 +5204,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= test(join->mixed_implicit_grouping);
}
if ((nested_join= table->nested_join))