1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
Removed an assertion that was not valid for the cases where the query
in a prepared statement contained a single-row non-correlated
subquery that was used as an argument of the IS NULL predicate.


mysql-test/r/ps.result:
  Added a test case for bug #25027.
mysql-test/t/ps.test:
  Added a test case for bug #25027.
This commit is contained in:
unknown
2006-12-13 00:39:13 -08:00
parent 22192d083a
commit 2f78d5ca81
3 changed files with 33 additions and 1 deletions

View File

@ -1514,4 +1514,19 @@ Variable_name Value
Slow_queries 1
deallocate prepare no_index;
deallocate prepare sq;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1), (2);
CREATE TABLE t2 (b int);
INSERT INTO t2 VALUES (NULL);
SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL;
a
1
2
PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL';
EXECUTE stmt;
a
1
2
DEALLOCATE PREPARE stmt;
DROP TABLE t1,t2;
End of 5.0 tests.

View File

@ -1563,4 +1563,22 @@ execute sq;
deallocate prepare no_index;
deallocate prepare sq;
#
# Bug 25027: query with a single-row non-correlated subquery
# and IS NULL predicate
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1), (2);
CREATE TABLE t2 (b int);
INSERT INTO t2 VALUES (NULL);
SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL;
PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL';
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t1,t2;
--echo End of 5.0 tests.