summaryrefslogtreecommitdiff
path: root/mysql-test/r/type_time.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2014-06-04 20:32:57 +0400
committerAlexander Barkov <bar@mariadb.org>2014-06-04 20:32:57 +0400
commit661daf16f11ffa879ffb005008b6e73f6744e0ad (patch)
treec0f1facac5d17e590dc2aa12353d2f513c007bdf /mysql-test/r/type_time.result
parenta1975dd2c106180ab16836631e6797cff5b4e396 (diff)
downloadmariadb-git-661daf16f11ffa879ffb005008b6e73f6744e0ad.tar.gz
MDEV-4858 Wrong results for a huge unsigned value inserted into a TIME column
MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND) MDEV-6097 Inconsistent results for CAST(int,decimal,double AS DATETIME) MDEV-6100 No warning on CAST(9000000 AS TIME)
Diffstat (limited to 'mysql-test/r/type_time.result')
-rw-r--r--mysql-test/r/type_time.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result
index 26e42d3b3b2..56b35e04502 100644
--- a/mysql-test/r/type_time.result
+++ b/mysql-test/r/type_time.result
@@ -298,5 +298,33 @@ Field Type Null Key Default Extra
MAX(t1)+1 decimal(22,1) YES NULL
DROP TABLE t2,t1;
#
+# MDEV-4858 Wrong results for a huge unsigned value inserted into a TIME column
+#
+SET sql_mode=traditional;
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
+ERROR 22007: Incorrect time value: '18446744069414584320' for column 'a' at row 1
+SET sql_mode=DEFAULT;
+INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+SELECT * FROM t1;
+a
+838:59:59.999999
+DROP TABLE t1;
+SELECT TIME'00:00:00'> CAST(0xFFFFFFFF00000000 AS UNSIGNED);
+TIME'00:00:00'> CAST(0xFFFFFFFF00000000 AS UNSIGNED)
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '00:00:00'
+#
+# MDEV-6100 No warning on CAST(9000000 AS TIME)
+#
+SELECT CAST(9000000 AS TIME);
+CAST(9000000 AS TIME)
+838:59:59
+Warnings:
+Warning 1292 Truncated incorrect time value: '9000000'
+#
# End of 5.3 tests
#