diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
commit | 7df026676b6d845cc0ed7a7437995c3019a5f42d (patch) | |
tree | dc051ac4712ac159b52fc2b48e5dd918cbc39799 /mysql-test/t/subselect.test | |
parent | f59d1dcf0acc12c482c28c902a0030f12ba263af (diff) | |
parent | f09ca00e088b316441bb76e97ba097bc9f3da7d3 (diff) | |
download | mariadb-git-7df026676b6d845cc0ed7a7437995c3019a5f42d.tar.gz |
Merge MariaDB-5.2 -> MariaDB 5.3
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index a6302cab5d8..65e2d332b24 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -41,7 +41,7 @@ SELECT 1 IN (SELECT 1); SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); -- error ER_WRONG_USAGE select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); --- error ER_WRONG_USAGE +-- error ER_WRONG_PARAMETERS_TO_PROCEDURE SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -- error ER_BAD_FIELD_ERROR SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; @@ -4065,5 +4065,19 @@ SELECT 1 FROM t1 GROUP BY DROP TABLE t1; set @@optimizer_switch=@save_optimizer_switch; +--echo # +--echo # Bug #49512 : subquery with aggregate function crash +--echo # subselect_single_select_engine::exec() + +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(); + +--echo # should not crash +SELECT 1 FROM t1 WHERE a <> SOME +( + SELECT MAX((SELECT a FROM t1 LIMIT 1)) AS d + FROM t1,t1 a +); +DROP TABLE t1; --echo End of 5.1 tests. |