Commit a9e65c89 authored by gkodinov/kgeorge@magare.gmz's avatar gkodinov/kgeorge@magare.gmz

Merge magare.gmz:/home/kgeorge/mysql/work/B31884-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/work/B31884-5.1-opt
parents 69ed192e 01fe24cd
...@@ -4139,6 +4139,17 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1; ...@@ -4139,6 +4139,17 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
(SELECT SUM(t1.a) FROM t2 WHERE a=1) (SELECT SUM(t1.a) FROM t2 WHERE a=1)
3 3
DROP TABLE t1,t2; 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. End of 5.0 tests.
CREATE TABLE t1 (a int, b int); CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22); INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
......
...@@ -2987,6 +2987,21 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a!=0) FROM t1; ...@@ -2987,6 +2987,21 @@ SELECT (SELECT SUM(t1.a) FROM t2 WHERE a!=0) FROM t1;
SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1; SELECT (SELECT SUM(t1.a) FROM t2 WHERE a=1) FROM t1;
DROP TABLE t1,t2; DROP TABLE t1,t2;
#
# Bug #31884: Assertion + crash in subquery in the SELECT clause.
#
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;
DROP TABLE t1, t2;
--echo End of 5.0 tests. --echo End of 5.0 tests.
# #
......
...@@ -307,6 +307,7 @@ public: ...@@ -307,6 +307,7 @@ public:
double val_real(); double val_real();
String *val_str(String*); String *val_str(String*);
my_decimal *val_decimal(my_decimal *); my_decimal *val_decimal(my_decimal *);
void update_null_value () { (void) val_bool(); }
bool val_bool(); bool val_bool();
void top_level_item() { abort_on_null=1; } void top_level_item() { abort_on_null=1; }
inline bool is_top_level_item() { return abort_on_null; } inline bool is_top_level_item() { return abort_on_null; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment