summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect.result
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-10-30 14:27:21 +0200
committergkodinov/kgeorge@magare.gmz <>2007-10-30 14:27:21 +0200
commit01fe24cd68bfd00183745df215c98175bf898afe (patch)
treec3c871076956b9278b40fd28252af390b8c10a78 /mysql-test/r/subselect.result
parent76bf63ba4ba05f79abbdb3ba74de068324088851 (diff)
downloadmariadb-git-01fe24cd68bfd00183745df215c98175bf898afe.tar.gz
Bug #31884: Assertion + crash in subquery in the SELECT clause.
Item_in_subselect's only externally callable method is val_bool(). However the nullability in the wrapper class (Item_in_optimizer) is established by calling the "forbidden" method val_int(). Fixed to use the correct method (val_bool() ) to establish nullability of Item_in_subselect in Item_in_optimizer.
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r--mysql-test/r/subselect.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index be99bdb1afc..bfacfc86eef 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -4139,4 +4139,15 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
(SELECT SUM(t1.a) FROM t2 WHERE a=1)
3
DROP TABLE t1,t2;
+CREATE TABLE t1 (a1 INT, a2 INT);
+CREATE TABLE t2 (b1 INT, b2 INT);
+INSERT INTO t1 VALUES (100, 200);
+INSERT INTO t1 VALUES (101, 201);
+INSERT INTO t2 VALUES (101, 201);
+INSERT INTO t2 VALUES (103, 203);
+SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
+((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL
+0
+0
+DROP TABLE t1, t2;
End of 5.0 tests.