diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-09-13 23:42:00 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-09-13 23:42:00 +0200 |
commit | e7c4e6d8708378f4b501eec3576a3229136144e3 (patch) | |
tree | 283a2ee0d9b9cb43b5620a17261a6af1b2ca197f /mysql-test/r/derived.result | |
parent | c570719ef220aeb2b0aa1b19cd474917280f94e6 (diff) | |
download | mariadb-git-e7c4e6d8708378f4b501eec3576a3229136144e3.tar.gz |
MDEV-5012 Server crashes in Item_ref::real_item on EXPLAIN with select subqueries or views, constant table, derived_merge+derived_with_keys
revert incorrect change, merged from mysql-5.5
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r-- | mysql-test/r/derived.result | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index c94618a9497..685e8ddd6bc 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -476,4 +476,18 @@ n d1 d2 result 2085 2012-01-01 00:00:00 2013-01-01 00:00:00 0 2084 2012-02-01 00:00:00 2013-01-01 00:00:00 0 drop table t1; +SET optimizer_switch = 'derived_merge=on,derived_with_keys=on,in_to_exists=on'; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (8); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(7); +EXPLAIN SELECT * FROM (SELECT * FROM t1) AS table1, +(SELECT DISTINCT * FROM t2) AS table2 WHERE b = a AND a <> ANY (SELECT 9); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY <derived3> ref key0 key0 5 const 0 +3 DERIVED t2 ALL NULL NULL NULL NULL 2 Using temporary +Warnings: +Note 1249 Select 4 was reduced during optimization +DROP TABLE t1, t2; set optimizer_switch=@save_derived_optimizer_switch; |