summaryrefslogtreecommitdiff
path: root/mysql-test/t/type_time.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/type_time.test')
-rw-r--r--mysql-test/t/type_time.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test
index 84d6f58dea1..2ddb6f9dffc 100644
--- a/mysql-test/t/type_time.test
+++ b/mysql-test/t/type_time.test
@@ -101,6 +101,28 @@ DROP TABLE t1;
--echo End of 5.1 tests
+create table t1 (a time);
+insert t1 values (-131415);
+select * from t1;
+drop table t1;
+
+#
+# lp:731229 Different results depending on table access method with TIME column and CURDATE()
+#
+create table t1 (f1 time , f2 varchar(5), key(f1));
+insert into t1 values ('00:20:01','a'),('00:20:03','b');
+select * from t1 force key (f1) where f1 < curdate();
+select * from t1 ignore key (f1) where f1 < curdate();
+drop table t1;
+
+#
+# comparison of time and datetime:
+#
+create table t1(f1 time);
+insert into t1 values ('23:38:57');
+select f1, f1 = '2010-10-11 23:38:57' from t1;
+drop table t1;
+
#
# Bug#42664 - Sign ignored for TIME types when not comparing as longlong
#
@@ -117,4 +139,3 @@ SELECT CAST('-24:00:00' AS TIME) = (SELECT f1 FROM t1);
SELECT '-24:00:00' = (SELECT f1 FROM t1);
DROP TABLE t1;
---echo End of 6.0 tests