diff options
author | Alexey Botchkov <holyfoot@mysql.com> | 2008-09-29 19:11:34 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@mysql.com> | 2008-09-29 19:11:34 +0500 |
commit | ce64a16b75746848c8d5a89cfb726a38691c9d6f (patch) | |
tree | cdb71d2132a10b7e94fede365fd8f6c5bc4ee92b /mysql-test/t/sp-error.test | |
parent | 119c5aaeba2b35f201bdbd98c0714be9b6a780fb (diff) | |
download | mariadb-git-ce64a16b75746848c8d5a89cfb726a38691c9d6f.tar.gz |
Bug#37949 Crash if argument to SP is a subquery that returns more than one row
JOIN for the subselect wasn't cleaned if we came upon an error
during sub_select() execution. That leads to the assertion failure
in close_thread_tables()
part of the 6.0 code backported
per-file comments:
mysql-test/r/sp-error.result
Bug#37949 Crash if argument to SP is a subquery that returns more than one row
test result
mysql-test/t/sp-error.test
Bug#37949 Crash if argument to SP is a subquery that returns more than one row
test case
sql/sp_head.cc
Bug#37949 Crash if argument to SP is a subquery that returns more than one row
lex->unit.cleanup() call added if not substatement
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r-- | mysql-test/t/sp-error.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index c9b2b1dbd0e..c839b1e4374 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -2173,6 +2173,14 @@ begin end loop; end| +CREATE TABLE t1 (a INT)| +INSERT INTO t1 VALUES (1),(2)| +CREATE PROCEDURE p1(a INT) BEGIN END| +--error ER_SUBQUERY_NO_1_ROW +CALL p1((SELECT * FROM t1))| +DROP PROCEDURE IF EXISTS p1| +DROP TABLE t1| + delimiter ;| # |