[MDEV-24800] sys_vars.timestamp_basic, main.system_time_debug fail if executed in the hour of daylight saving time switch Created: 2021-02-06  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.0, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Probably all versions are affected, I've set those where the failure was actually seen in buildbot.

10.3 Nov 1 2020

sys_vars.timestamp_basic                 w4 [ fail ]
        Test ended at 2020-11-01 01:35:04
 
CURRENT_TEST: sys_vars.timestamp_basic
--- /mnt/buildbot/build/mariadb-10.3.26/mysql-test/suite/sys_vars/r/timestamp_basic.result	2020-10-31 21:03:43.000000000 -0400
+++ /mnt/buildbot/build/mariadb-10.3.26/mysql-test/suite/sys_vars/r/timestamp_basic.reject	2020-11-01 01:35:03.418552741 -0400
@@ -3,7 +3,7 @@
 SET @@timestamp = DEFAULT;
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 '#---------------------FN_DYNVARS_001_02-------------------------#'
 SET @@global.timestamp = "1000";
 ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
@@ -11,14 +11,14 @@
 SET @@timestamp = 0;
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 'Setting 0 resets timestamp to session default timestamp'
 SET @@timestamp = -1000000000;
 Warnings:
 Warning	1292	Truncated incorrect timestamp value: '-1000000000'
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 SET @temp_ts = @@timestamp - @@timestamp;
 SELECT @temp_ts;
 @temp_ts
 
mysqltest: Result content mismatch

10.0 Oct 25 2015

sys_vars.timestamp_basic                 w1 [ fail ]
        Test ended at 2015-10-25 03:28:37
 
CURRENT_TEST: sys_vars.timestamp_basic
--- /mnt/buildbot/build/mariadb-10.0.22/mysql-test/suite/sys_vars/r/timestamp_basic.result	2015-10-24 19:25:31.000000000 +0300
+++ /mnt/buildbot/build/mariadb-10.0.22/mysql-test/suite/sys_vars/r/timestamp_basic.reject	2015-10-25 03:28:37.000000000 +0300
@@ -3,7 +3,7 @@
 SET @@timestamp = DEFAULT;
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 '#---------------------FN_DYNVARS_001_02-------------------------#'
 SET @@global.timestamp = "1000";
 ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
@@ -11,14 +11,14 @@
 SET @@timestamp = 0;
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 'Setting 0 resets timestamp to session default timestamp'
 SET @@timestamp = -1000000000;
 Warnings:
 Warning	1292	Truncated incorrect timestamp value: '-1000000000'
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 SET @temp_ts = @@timestamp - @@timestamp;
 SELECT @temp_ts;
 @temp_ts
 
mysqltest: Result content mismatch

10.4-based dev branch Nov 4 2018

sys_vars.timestamp_basic                 w2 [ fail ]
        Test ended at 2018-11-04 01:10:52
 
CURRENT_TEST: sys_vars.timestamp_basic
--- /usr/share/mysql/mysql-test/suite/sys_vars/r/timestamp_basic.result	2018-11-03 23:20:22.000000000 -0400
+++ /dev/shm/var/2/log/timestamp_basic.reject	2018-11-04 01:10:52.797696576 -0400
@@ -3,7 +3,7 @@
 SET @@timestamp = DEFAULT;
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 '#---------------------FN_DYNVARS_001_02-------------------------#'
 SET @@global.timestamp = "1000";
 ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
@@ -11,14 +11,14 @@
 SET @@timestamp = 0;
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 'Setting 0 resets timestamp to session default timestamp'
 SET @@timestamp = -1000000000;
 Warnings:
 Warning	1292	Truncated incorrect timestamp value: '-1000000000'
 SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
 floor(@@timestamp) = UNIX_TIMESTAMP()	@@timestamp = UNIX_TIMESTAMP(NOW(6))
-1	1
+1	0
 SET @temp_ts = @@timestamp - @@timestamp;
 SELECT @temp_ts;
 @temp_ts
 
mysqltest: Result content mismatch

10.3

main.system_time_debug                   w1 [ fail ]
        Test ended at 2020-11-01 01:29:48
 
CURRENT_TEST: main.system_time_debug
Warning: /mnt/buildbot/build/mariadb-10.3.26/libmysqld/examples/mysqltest_embedded: unknown variable 'loose-ssl-ca=/mnt/buildbot/build/mariadb-10.3.26/mysql-test/std_data/cacert.pem'
Warning: /mnt/buildbot/build/mariadb-10.3.26/libmysqld/examples/mysqltest_embedded: unknown variable 'loose-ssl-cert=/mnt/buildbot/build/mariadb-10.3.26/mysql-test/std_data/client-cert.pem'
Warning: /mnt/buildbot/build/mariadb-10.3.26/libmysqld/examples/mysqltest_embedded: unknown variable 'loose-ssl-key=/mnt/buildbot/build/mariadb-10.3.26/mysql-test/std_data/client-key.pem'
Warning: /mnt/buildbot/build/mariadb-10.3.26/libmysqld/examples/mysqltest_embedded: unknown option '--loose-skip-ssl'
--- /mnt/buildbot/build/mariadb-10.3.26/mysql-test/main/system_time_debug.result	2020-10-31 21:03:38.000000000 -0400
+++ /mnt/buildbot/build/mariadb-10.3.26/mysql-test/main/system_time_debug.reject	2020-11-01 01:29:48.086051789 -0400
@@ -1,7 +1,7 @@
 set @old_dbug=@@debug_dbug;
 select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
 must be 0	must be 0
-0	0
+0	60
 set @@debug_dbug='+d,system_time_plus_one_hour';
 select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
 must be 0	must be 0
@@ -13,4 +13,4 @@
 set @@debug_dbug=@old_dbug;
 select timestampdiff(minute,now(),sysdate()) as 'must be 0', (unix_timestamp(sysdate()) - unix_timestamp()) div 60 as 'must be 0';
 must be 0	must be 0
-0	0
+0	60
 
mysqltest: Result length mismatch


Generated at Thu Feb 08 09:32:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.