Skip to content

Commit 051c83f

Browse files
author
Tor Didriksen
committed
NULL merge of backport of Bug #46860 Crash/segfault ...
Then patch in the new test case for Bug#11829785 EXPLAIN EXTENDED CRASH ...
2 parents a06949e + 4a6d020 commit 051c83f

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

mysql-test/r/explain.result

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,4 +443,17 @@ Note 1003 select `test`.`t1`.`url` AS `url` from `test`.`t1` where (`test`.`t1`.
443443

444444
DROP TABLE t1;
445445
# End BUG#53562
446+
#
447+
# Bug#11829785 EXPLAIN EXTENDED CRASH WITH RIGHT OUTER JOIN, SUBQUERIES
448+
#
449+
CREATE TABLE t1(a INT);
450+
INSERT INTO t1 VALUES (0), (0);
451+
PREPARE s FROM
452+
'EXPLAIN EXTENDED
453+
SELECT SUBSTRING(1, (SELECT 1 FROM t1 a1 RIGHT OUTER JOIN t1 ON 0)) AS d
454+
FROM t1 WHERE 0 > ANY (SELECT @a FROM t1)';
455+
EXECUTE s;
456+
ERROR 21000: Subquery returns more than 1 row
457+
DEALLOCATE PREPARE s;
458+
DROP TABLE t1;
446459
End of 6.0 tests.

mysql-test/t/explain.test

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,4 +354,23 @@ DROP TABLE t1;
354354

355355
--echo # End BUG#53562
356356

357+
--echo #
358+
--echo # Bug#11829785 EXPLAIN EXTENDED CRASH WITH RIGHT OUTER JOIN, SUBQUERIES
359+
--echo #
360+
361+
CREATE TABLE t1(a INT);
362+
363+
INSERT INTO t1 VALUES (0), (0);
364+
365+
PREPARE s FROM
366+
'EXPLAIN EXTENDED
367+
SELECT SUBSTRING(1, (SELECT 1 FROM t1 a1 RIGHT OUTER JOIN t1 ON 0)) AS d
368+
FROM t1 WHERE 0 > ANY (SELECT @a FROM t1)';
369+
370+
--error ER_SUBQUERY_NO_1_ROW
371+
EXECUTE s;
372+
373+
DEALLOCATE PREPARE s;
374+
DROP TABLE t1;
375+
357376
--echo End of 6.0 tests.

0 commit comments

Comments
 (0)