Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MDEV-9683 Server crashes in Item::basic_const_item on numerous nested…
… NULLIFs

test case only
  • Loading branch information
vuvova committed Mar 5, 2016
1 parent 70f5fab commit 33d2984
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mysql-test/r/null.result
Expand Up @@ -1566,6 +1566,11 @@ f1
EXECUTE stmt;
f1
DROP TABLE t1;
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
SELECT * FROM t1 WHERE NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(i = ROUND(0), 14), 13), 12), 11), 10), 9), 8), 7), 6), 5), 4), 3), 2), 1);
i
DROP TABLE t1;
#
# End of 10.1 tests
#
10 changes: 10 additions & 0 deletions mysql-test/t/null.test
Expand Up @@ -997,6 +997,16 @@ PREPARE stmt FROM "SELECT * FROM t1 WHERE NULLIF( ( 1, 2 ) IN ( SELECT 3, 4 ), 1
EXECUTE stmt;
EXECUTE stmt;
DROP TABLE t1;

#
# MDEV-9683 Server crashes in Item::basic_const_item on numerous nested NULLIFs
#
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
SELECT * FROM t1 WHERE NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(NULLIF(i = ROUND(0), 14), 13), 12), 11), 10), 9), 8), 7), 6), 5), 4), 3), 2), 1);
DROP TABLE t1;


--echo #
--echo # End of 10.1 tests
--echo #

0 comments on commit 33d2984

Please sign in to comment.