diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-10-12 00:37:58 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-10-12 00:37:58 +0200 |
commit | dfb74dea300f83880c11600dc726a9cae559f356 (patch) | |
tree | 76da0d6e23f188bc13520bf80496e9053f227d9a /mysql-test/r/subselect.result | |
parent | b785857d00a0fd9c98cb52823357bfad8fb18289 (diff) | |
parent | e7cb032e560e14865941ecdcb553cd3aba856b68 (diff) | |
download | mariadb-git-dfb74dea300f83880c11600dc726a9cae559f356.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r-- | mysql-test/r/subselect.result | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index c38107e5fc6..3f0e6955b67 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -81,7 +81,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -ERROR HY000: Incorrect parameters to procedure 'ANALYSE' +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; ERROR 42S22: Unknown column 'a' in 'field list' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; @@ -3597,7 +3597,7 @@ delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1; drop table t1, t2; CREATE TABLE t1 (a INT); CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); -ERROR 42S22: Unknown column 'no_such_column' in 'where clause' +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); ERROR 42S22: Unknown column 'no_such_column' in 'where clause' SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); @@ -7043,3 +7043,69 @@ select exists(select 1 from t1 group by `c` in (select `c` from t1)); exists(select 1 from t1 group by `c` in (select `c` from t1)) 0 drop table t1; +# +# MDEV-7565: Server crash with Signal 6 (part 2) +# +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +ControlRev +NULL +# +# MDEV-7445:Server crash with Signal 6 +# +CREATE PROCEDURE procedure2() +BEGIN +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` + From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +END | +call procedure2(); +ControlRev +NULL +call procedure2(); +ControlRev +NULL +drop procedure procedure2; +SELECT +(SELECT user FROM mysql.user +WHERE h.host in (SELECT host FROM mysql.user) +) AS sq +FROM mysql.host h GROUP BY h.host; +sq +# +# MDEV-7846:Server crashes in Item_subselect::fix +#_fields or fails with Thread stack overrun +# +CREATE TABLE t1 (column1 INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3),(9); +CREATE TABLE t2 (column2 INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(4); +CREATE TABLE t3 (column3 INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (6),(8); +CREATE TABLE t4 (column4 INT) ENGINE=MyISAM; +INSERT INTO t4 VALUES (2),(5); +PREPARE stmt FROM " +SELECT ( + SELECT MAX( table1.column1 ) AS field1 + FROM t1 AS table1 + WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 ) +) AS sq +FROM t3 AS table3, t4 AS table4 GROUP BY sq +"; +EXECUTE stmt; +sq +NULL +EXECUTE stmt; +sq +NULL +deallocate prepare stmt; +drop table t1,t2,t3,t4; |