diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-03-04 12:39:29 +0000 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-03-04 12:39:29 +0000 |
commit | 62809e2a096d80e927e04e3f151c59c88f561ffe (patch) | |
tree | 4e1328589784510425bf736068fd8546eea6e53a /mysql-test | |
parent | 08d27b7c5cc196f5642d34d3f95cf8f5daa429d1 (diff) | |
parent | c610e9783aa4474d2b4418f1b3b3685716a83454 (diff) | |
download | mariadb-git-62809e2a096d80e927e04e3f151c59c88f561ffe.tar.gz |
auto-merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/explain.result | 17 | ||||
-rw-r--r-- | mysql-test/t/explain.test | 22 |
2 files changed, 38 insertions, 1 deletions
diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index 8d3859fd68e..90a4136d030 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -167,3 +167,20 @@ EXPLAIN SELECT DISTINCT 1 FROM t1, WHERE t1.a = d1.a; ERROR 42S22: Unknown column 'd1.a' in 'where clause' DROP TABLE t1; +# +# Bug#48295: +# explain extended crash with subquery and ONLY_FULL_GROUP_BY sql_mode +# +CREATE TABLE t1 (f1 INT); +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>(...)) +SET SESSION sql_mode=@old_sql_mode; +DROP TABLE t1; +End of 5.0 tests. diff --git a/mysql-test/t/explain.test b/mysql-test/t/explain.test index 7b7bdd3563c..1b16c811dbd 100644 --- a/mysql-test/t/explain.test +++ b/mysql-test/t/explain.test @@ -147,4 +147,24 @@ EXPLAIN SELECT DISTINCT 1 FROM t1, WHERE t1.a = d1.a; DROP TABLE t1; -# End of 5.0 tests. +--echo # +--echo # Bug#48295: +--echo # explain extended crash with subquery and ONLY_FULL_GROUP_BY sql_mode +--echo # + +CREATE TABLE t1 (f1 INT); + +SELECT @@session.sql_mode INTO @old_sql_mode; +SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; + +# EXPLAIN EXTENDED (with subselect). used to crash. should give NOTICE. +--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS +EXPLAIN EXTENDED SELECT 1 FROM t1 + WHERE f1 > ALL( SELECT t.f1 FROM t1,t1 AS t ); +SHOW WARNINGS; + +SET SESSION sql_mode=@old_sql_mode; + +DROP TABLE t1; + +--echo End of 5.0 tests. |