summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_nulls.result
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-12 08:05:42 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-12 10:39:02 +0200
commitc5975eaea174460e774e77717e972a8d32e6c8de (patch)
tree2b42a0092094a1b908899e6f474e2623bb242937 /mysql-test/r/subselect_nulls.result
parentf305a7ce4bccbd56520d874e1d81a4f29bc17a96 (diff)
downloadmariadb-git-c5975eaea174460e774e77717e972a8d32e6c8de.tar.gz
MDEV-7339 Server crashes in Item_func_trig_cond::val_int
Item_in_subselect::pushed_cond_guards[] array is allocated only when left_expr->maybe_null. And it is used (for row expressions) when left_expr->element_index(i)->maybe_null. For left_expr being a multi-column subquery, its maybe_null is always false when the subquery doesn't use tables (see Item_singlerow_subselect::fix_length_and_dec() and subselect_single_select_engine::fix_length_and_dec()), otherwise it's always true. But row elements can be NULL regardless, so let's always allocate pushed_cond_guards for multi-column subqueries, no matter whether its maybe_null was forced to true or false.
Diffstat (limited to 'mysql-test/r/subselect_nulls.result')
-rw-r--r--mysql-test/r/subselect_nulls.result6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_nulls.result b/mysql-test/r/subselect_nulls.result
index 584c184870d..08982371269 100644
--- a/mysql-test/r/subselect_nulls.result
+++ b/mysql-test/r/subselect_nulls.result
@@ -115,3 +115,9 @@ k d1 d2
set optimizer_switch= @tmp_subselect_nulls;
drop table x1;
drop table x2;
+select (select 1, 2) in (select 3, 4);
+(select 1, 2) in (select 3, 4)
+0
+select (select NULL, NULL) in (select 3, 4);
+(select NULL, NULL) in (select 3, 4)
+NULL