diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2011-05-04 17:12:45 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2011-05-04 17:12:45 +0200 |
commit | e257fb3319ea6919de0a3c74c7025d4f9a218fed (patch) | |
tree | 4b2a82480afbf07a0e4ba4447dbf4f3a51761bbe /mysql-test/r | |
parent | b96d97fd7f25ad7570688cf38b10b4b77a648871 (diff) | |
parent | 1cf483aa588cf47383af49db6d7304b911ee92db (diff) | |
download | mariadb-git-e257fb3319ea6919de0a3c74c7025d4f9a218fed.tar.gz |
merge 5.0 => 5.1 : Bug#12329653
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/explain.result | 11 | ||||
-rw-r--r-- | mysql-test/r/subselect.result | 26 |
2 files changed, 32 insertions, 5 deletions
diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index 4bc6c0409f3..4a815549ba9 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -176,11 +176,12 @@ SELECT @@session.sql_mode INTO @old_sql_mode; SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE f1 > ALL( SELECT t.f1 FROM t1,t1 AS t ); -ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause -SHOW WARNINGS; -Level Code Message -Error 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause -Note 1003 select 1 AS `1` from `test`.`t1` where <not>(<exists>(...)) +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` where 0 SET SESSION sql_mode=@old_sql_mode; DROP TABLE t1; End of 5.0 tests. diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index dc40e42275b..cebdba6bb06 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4435,6 +4435,32 @@ pk int_key 3 3 7 3 DROP TABLE t1,t2; +# +# Bug#12329653 +# EXPLAIN, UNION, PREPARED STATEMENT, CRASH, SQL_FULL_GROUP_BY +# +CREATE TABLE t1(a1 int); +INSERT INTO t1 VALUES (1),(2); +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; +SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t1); +1 +1 +1 +PREPARE stmt FROM +'SELECT 1 UNION ALL +SELECT 1 FROM t1 +ORDER BY +(SELECT 1 FROM t1 AS t1_0 + WHERE 1 < SOME (SELECT a1 FROM t1) +)' ; +EXECUTE stmt ; +ERROR 21000: Subquery returns more than 1 row +EXECUTE stmt ; +ERROR 21000: Subquery returns more than 1 row +SET SESSION sql_mode=@old_sql_mode; +DEALLOCATE PREPARE stmt; +DROP TABLE t1; End of 5.0 tests. CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (2,22),(1,11),(2,22); |