diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 18:42:49 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-02-28 18:42:49 +0100 |
commit | 8161c6772d144d6a4f08fc924ff6e6e403d1371d (patch) | |
tree | 3f1fe5f8048a163da4eadf0f86c1fd2a3007955d /mysql-test/t/derived.test | |
parent | 154aac8eb002f5d167153e09f1d13570989521e0 (diff) | |
parent | 31c06437c970d4d0f4ec0301acac9c56e0ed29b5 (diff) | |
download | mariadb-git-8161c6772d144d6a4f08fc924ff6e6e403d1371d.tar.gz |
merge with mysql-5.5.30 minus few incorrect or not applicable changesets
Diffstat (limited to 'mysql-test/t/derived.test')
-rw-r--r-- | mysql-test/t/derived.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 4cf5cccc254..381c87c635c 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -343,3 +343,18 @@ SELECT 1 FROM t1 JOIN v1 ON 1 > (SELECT 1 FROM v2); DROP TABLE t1, t2; DROP VIEW v1, v2; set optimizer_switch=@save_derived_optimizer_switch; + +# +# MDEV-614 lp:1050806 - different result for a query using subquery between 5.5.25 and 5.5.27 +# MySQL Bug#66845 Wrong result (extra row) on a FROM subquery with a variable and ORDER BY +# +create table t1 (n bigint(20) unsigned, d1 datetime, d2 datetime, key (d1)); +insert t1 values (2085,'2012-01-01 00:00:00','2013-01-01 00:00:00'); +insert t1 values (2084,'2012-02-01 00:00:00','2013-01-01 00:00:00'); +insert t1 values (2088,'2012-03-01 00:00:00','2013-01-01 00:00:00'); +select * from ( + select n, d1, d2, @result := 0 as result + from t1 + where d1 < '2012-12-12 12:12:12' and n in (2085, 2084) order by d2 asc +) as calculated_result; +drop table t1; |