summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-01-08 14:43:14 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-01-08 14:43:14 +0400
commit0b590282fc116a1911eabe4cf1c7804a66f9bb48 (patch)
treed16ebbfaa4bad9cb8412cfbd4220f5a685126253 /sql/sql_select.cc
parentcd55894a52b5b2bf4a740eb0f39d91d7a82f673c (diff)
downloadmariadb-git-0b590282fc116a1911eabe4cf1c7804a66f9bb48.tar.gz
BUG#912510: Crash in do_copy_not_null with semijoin=ON, firstmatch=ON, aggregate ...
- Create/use do_copy_nullable_row_to_notnull() function for ref access, which is used when copying from not-NULL field in table that can be NULL-complemented to not-NULL field.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index cb620495897..c332b13dff6 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -646,6 +646,9 @@ JOIN::prepare(Item ***rref_pointer_array,
aggregate functions and non-aggregate fields, any non-aggregated field
may produce a NULL value. Set all fields of each table as nullable before
semantic analysis to take into account this change of nullability.
+
+ Note: this loop doesn't touch tables inside merged semi-joins, because
+ subquery-to-semijoin conversion has not been done yet. This is intended.
*/
if (mixed_implicit_grouping)
tbl->table->maybe_null= 1;