summaryrefslogtreecommitdiff
path: root/mysql-test/r/derived.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-02-28 18:42:49 +0100
committerSergei Golubchik <sergii@pisem.net>2013-02-28 18:42:49 +0100
commit8161c6772d144d6a4f08fc924ff6e6e403d1371d (patch)
tree3f1fe5f8048a163da4eadf0f86c1fd2a3007955d /mysql-test/r/derived.result
parent154aac8eb002f5d167153e09f1d13570989521e0 (diff)
parent31c06437c970d4d0f4ec0301acac9c56e0ed29b5 (diff)
downloadmariadb-git-8161c6772d144d6a4f08fc924ff6e6e403d1371d.tar.gz
merge with mysql-5.5.30 minus few incorrect or not applicable changesets
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r--mysql-test/r/derived.result13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index c6b8bf73a6f..363a4700ee6 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -441,3 +441,16 @@ ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1, t2;
DROP VIEW v1, v2;
set optimizer_switch=@save_derived_optimizer_switch;
+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;
+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;