summaryrefslogtreecommitdiff
path: root/mysql-test/main/old-mode.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-04-12 15:50:08 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2023-04-12 15:50:08 +0300
commit1d1e0ab2ccc0d108b932327d0e851505448d1880 (patch)
treedfcaf9e556d3e430ab8b4174bc6ffb664b8435a3 /mysql-test/main/old-mode.result
parenta1ba06f2a795a63fd2e61aa671daf24730b5f66a (diff)
parenta091d6ac4e7d2d7873749e685943b3032ccfda57 (diff)
downloadmariadb-git-1d1e0ab2ccc0d108b932327d0e851505448d1880.tar.gz
Merge 10.6 into 10.8
Diffstat (limited to 'mysql-test/main/old-mode.result')
-rw-r--r--mysql-test/main/old-mode.result36
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/main/old-mode.result b/mysql-test/main/old-mode.result
index e0a3412bbdf..bb65acd54ce 100644
--- a/mysql-test/main/old-mode.result
+++ b/mysql-test/main/old-mode.result
@@ -221,3 +221,39 @@ a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a)
DROP TABLE t1;
SET time_zone=DEFAULT;
SET global mysql56_temporal_format=true;
+#
+# MDEV-26765 UNIX_TIMESTAMP(CURRENT_TIME()) return null ?!?
+#
+SET old_mode=zero_date_time_cast;
+SET @@time_zone='+00:00';
+SET timestamp=1234567;
+SELECT CURRENT_TIMESTAMP;
+CURRENT_TIMESTAMP
+1970-01-15 06:56:07
+SELECT UNIX_TIMESTAMP(CURRENT_TIME());
+UNIX_TIMESTAMP(CURRENT_TIME())
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '06:56:07'
+SELECT UNIX_TIMESTAMP(TIME'06:56:07');
+UNIX_TIMESTAMP(TIME'06:56:07')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '06:56:07'
+SELECT UNIX_TIMESTAMP(TIME'10:20:30');
+UNIX_TIMESTAMP(TIME'10:20:30')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '10:20:30'
+CREATE OR REPLACE TABLE t1 (a TIME);
+INSERT INTO t1 VALUES (TIME'06:56:07'),('10:20:30');
+SELECT UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+UNIX_TIMESTAMP(a)
+NULL
+NULL
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 2
+DROP TABLE t1;
+SET @@time_zone=DEFAULT;
+SET TIMESTAMP=DEFAULT;