diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-11-06 17:20:27 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-11-06 17:20:27 +0300 |
commit | 7cd11f45beeb162db84dea423a040a296ac2856e (patch) | |
tree | 3fcae3d99a56ba99d825ae4457901d49e4b474e3 /mysql-test/t/explain.test | |
parent | 5462a6dbcc68d51a89356255fb4f398be7d62c27 (diff) | |
parent | 3e2c9aac11a95d8cbb61e1937e4ebe18c7e86698 (diff) | |
download | mariadb-git-7cd11f45beeb162db84dea423a040a296ac2856e.tar.gz |
Manual merge from mysql-trunk-merge.
Diffstat (limited to 'mysql-test/t/explain.test')
-rw-r--r-- | mysql-test/t/explain.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/explain.test b/mysql-test/t/explain.test index 162a310c0a6..7e2a9bdc811 100644 --- a/mysql-test/t/explain.test +++ b/mysql-test/t/explain.test @@ -167,6 +167,25 @@ flush tables; SELECT OUTR.dt FROM t1 AS OUTR WHERE OUTR.dt IN ( SELECT INNR.dt FROM t2 AS INNR WHERE OUTR.t < '2005-11-13 7:41:31' ); drop tables t1, t2; +--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 # --echo # Bug#30302: Tables that were optimized away are printed in the @@ -179,4 +198,5 @@ insert into t2 values(1),(2); explain extended select * from t1 where f1=1; explain extended select * from t1 join t2 on f1=f2 where f1=1; drop table t1,t2; + --echo End of 5.1 tests. |