summaryrefslogtreecommitdiff
path: root/mysql-test/r/myisam_icp.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-05-27 15:20:19 -0700
committerIgor Babaev <igor@askmonty.org>2011-05-27 15:20:19 -0700
commitd86ad1861a57558e63dc68bf372eff6bdb22cb6d (patch)
tree38cf953c068132ff125bdab7e1e0c2b4a27f85c6 /mysql-test/r/myisam_icp.result
parentdeb3b9a17498d101468fc12a633245fc74730133 (diff)
downloadmariadb-git-d86ad1861a57558e63dc68bf372eff6bdb22cb6d.tar.gz
Backported the test case for bug 43617 fixed by the patch for bug 42580.
Backported the test case for bug 49906 fixed by the patch for LP bug 625841. Slightly optimized the code of the fix for LP bug 625841.
Diffstat (limited to 'mysql-test/r/myisam_icp.result')
-rw-r--r--mysql-test/r/myisam_icp.result69
1 files changed, 69 insertions, 0 deletions
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index 742792ec772..41f0d411be4 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -79,6 +79,75 @@ c1 c2 c3 c4
DROP TABLE t1;
#
+# Bug#43617 - Innodb returns wrong results with timestamp's range value
+# in IN clause
+# (Note: Fixed by patch for BUG#42580)
+#
+CREATE TABLE t1(
+c1 TIMESTAMP NOT NULL,
+c2 TIMESTAMP NULL,
+c3 DATE,
+c4 DATETIME,
+PRIMARY KEY(c1),
+UNIQUE INDEX(c2)
+);
+INSERT INTO t1 VALUES
+('0000-00-00 00:00:00','0000-00-00 00:00:00','2008-01-04','2008-01-05 00:00:00'),
+('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02 00:00:00'),
+('1999-01-01 00:00:00','1999-01-01 00:00:00', NULL, NULL),
+('2007-05-23 09:15:28','2007-05-23 09:15:28','2007-05-24','2007-05-24 09:15:28'),
+('2007-05-27 00:00:00','2007-05-25 00:00:00','2007-05-26','2007-05-26 00:00:00'),
+('2008-01-01 00:00:00', NULL, '2008-01-02','2008-01-03 00:00:00'),
+('2009-01-29 11:11:27','2009-01-29 11:11:27','2009-01-29','2009-01-29 11:11:27'),
+('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06 00:00:00');
+
+SELECT *
+FROM t1
+WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
+ORDER BY c2;
+c1 c2 c3 c4
+2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
+
+SELECT *
+FROM t1
+WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
+ORDER BY c2 LIMIT 2;
+c1 c2 c3 c4
+2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
+
+SELECT *
+FROM t1
+WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
+ORDER BY c2 DESC;
+c1 c2 c3 c4
+2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
+
+SELECT *
+FROM t1
+WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07')
+ORDER BY c2 DESC LIMIT 2;
+c1 c2 c3 c4
+2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
+
+DROP TABLE t1;
+#
+# BUG#49906: Assertion failed - Field_varstring::val_str in field.cc
+# (Note: Fixed by patch for LP BUG#625841)
+#
+CREATE TABLE t1 (
+f1 VARCHAR(1024),
+f2 VARCHAR(10),
+INDEX test_idx USING BTREE (f2,f1(5))
+);
+INSERT INTO t1 VALUES ('a','c'), ('b','d');
+SELECT f1
+FROM t1
+WHERE f2 LIKE 'd'
+ORDER BY f1;
+f1
+b
+DROP TABLE t1;
+#
# Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on
#
CREATE TABLE t (