[debian-mysql] Bug#1065509: mysql-8.0 ftbfs with test failure on 32bit time_t64

Matthias Klose doko at debian.org
Tue Mar 5 19:38:18 GMT 2024


Package: src:mysql-8.0
Version: 8.0.36-1
Severity: serious
Tags: sid trixie

here seen on armhf:

[...]
[ 58%] main.compare                             w4  [ pass ]   2171
[ 58%] main.func_unixtime_32bits                w1  [ fail ]
         Test ended at 2024-03-05 17:31:14

CURRENT_TEST: main.func_unixtime_32bits

CURRENT_TEST: main.func_unixtime_32bits
--- /<<PKGBUILDDIR>>/mysql-test/r/func_unixtime_32bits.result	2023-12-12 
21:09:36.000000000 +0300
+++ 
/<<PKGBUILDDIR>>/builddir/mysql-test/var/1/log/func_unixtime_32bits.reject 
2024-03-05 20:31:13.393008921 +0300
@@ -12,7 +12,7 @@
  2038-01-19 06:14:07
  select from_unixtime(2147483648);
  from_unixtime(2147483648)
-NULL
+2038-01-19 06:14:08
  select from_unixtime(0);
  from_unixtime(0)
  1970-01-01 03:00:00
@@ -32,26 +32,26 @@
  2147483647
  select unix_timestamp(from_unixtime(2147483648));
  unix_timestamp(from_unixtime(2147483648))
-NULL
+2147483648
  # check for invalid dates
  # bad year
  select unix_timestamp('2039-01-20 01:00:00');
  unix_timestamp('2039-01-20 01:00:00')
-0
+2179087200
  select unix_timestamp('1968-01-20 01:00:00');
  unix_timestamp('1968-01-20 01:00:00')
  0
  # bad month
  select unix_timestamp('2038-02-10 01:00:00');
  unix_timestamp('2038-02-10 01:00:00')
-0
+2149365600
  select unix_timestamp('1969-11-20 01:00:00');
  unix_timestamp('1969-11-20 01:00:00')
  0
  # bad day
  select unix_timestamp('2038-01-20 01:00:00');
  unix_timestamp('2038-01-20 01:00:00')
-0
+2147551200
  select unix_timestamp('1969-12-30 01:00:00');
  unix_timestamp('1969-12-30 01:00:00')
  0
@@ -71,7 +71,7 @@
  # check bad date, close to the boundary (we cut them off in the very end)
  select unix_timestamp('2038-01-19 07:14:07');
  unix_timestamp('2038-01-19 07:14:07')
-0
+2147487247
  # ------ 1. func_time.test   END
  # ------ 2. time_zone.test   BEGIN
  #
@@ -84,20 +84,20 @@
  unix_timestamp('2038-01-19 04:14:07'),
  unix_timestamp('2038-01-19 04:14:08');
  unix_timestamp('1970-01-01 01:00:00')	unix_timestamp('1970-01-01 
01:00:01')	unix_timestamp('2038-01-19 04:14:07') 
unix_timestamp('2038-01-19 04:14:08')
-0	1	2147483647	0
+0	1	2147483647	2147483648
  set time_zone=default;
  # ------ 2. time_zone.test   END
  # ------ 3. time_zone2.test   BEGIN
  select convert_tz('2038-01-19 04:14:08', '+01:00', 'UTC');
  convert_tz('2038-01-19 04:14:08', '+01:00', 'UTC')
-2038-01-19 04:14:08
+2038-01-19 03:14:08
  select convert_tz('2103-01-01 04:00:00', 'MET', 'UTC');
  convert_tz('2103-01-01 04:00:00', 'MET', 'UTC')
-2103-01-01 04:00:00
+2103-01-01 03:00:00
  Will work on a 64 bits time system, no-op on 32 bits time
  select convert_tz('3001-01-18 23:59:59', 'UTC', '+01:00');
  convert_tz('3001-01-18 23:59:59', 'UTC', '+01:00')
-3001-01-18 23:59:59
+3001-01-19 00:59:59
  Will not work, beyond range of UNIX timestamp support
  select convert_tz('3001-01-19 00:00:00', 'UTC', '+01:00');
  convert_tz('3001-01-19 00:00:00', 'UTC', '+01:00')
@@ -123,12 +123,12 @@
  (32536771199.9999999);
  SELECT a, FROM_UNIXTIME(a) FROM t1;
  a	FROM_UNIXTIME(a)
-32536771199.9999990	NULL
-32536771199.9999990	NULL
-32536771199.9999991	NULL
-32536771199.9999992	NULL
-32536771199.9999993	NULL
-32536771199.9999994	NULL
+32536771199.9999990	3001-01-18 23:59:59.999999
+32536771199.9999990	3001-01-18 23:59:59.999999
+32536771199.9999991	3001-01-18 23:59:59.999999
+32536771199.9999992	3001-01-18 23:59:59.999999
+32536771199.9999993	3001-01-18 23:59:59.999999
+32536771199.9999994	3001-01-18 23:59:59.999999
  32536771199.9999995	NULL
  32536771199.9999996	NULL
  32536771199.9999997	NULL
@@ -148,7 +148,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 03:14:07	NULL	NULL	NULL	NULL
+2038-01-19 03:14:07	2038-01-19 03:14:08	2038-01-19 03:14:08.000000 
3001-01-18 23:59:59	NULL
  SET time_zone=default;
  SELECT
  FROM_UNIXTIME(2147483647) AS c1,
@@ -157,7 +157,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 06:14:07	NULL	NULL	NULL	NULL
+2038-01-19 06:14:07	2038-01-19 06:14:08	2038-01-19 06:14:08.000000 
3001-01-19 02:59:59	NULL
  SET sql_mode=time_truncate_fractional;
  SET time_zone='+00:00';
  SELECT
@@ -167,7 +167,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 03:14:07	NULL	2038-01-19 03:14:07.999999	NULL	NULL
+2038-01-19 03:14:07	2038-01-19 03:14:08	2038-01-19 03:14:07.999999 
3001-01-18 23:59:59	3001-01-18 23:59:59.999999
  SET time_zone=default;
  SELECT
  FROM_UNIXTIME(2147483647) AS c1,
@@ -176,7 +176,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 06:14:07	NULL	2038-01-19 06:14:07.999999	NULL	NULL
+2038-01-19 06:14:07	2038-01-19 06:14:08	2038-01-19 06:14:07.999999 
3001-01-19 02:59:59	3001-01-19 02:59:59.999999
  SET sql_mode=default;
  # ------ 4. type_temporal_fractional.test   END
  # ------ 5 and 6. type_timestamp{_explicit}.test   BEGIN
@@ -194,15 +194,19 @@
  INSERT INTO t1 (f2,f3) VALUES (NOW(), NULL);
  INSERT INTO t1 (f2,f3) VALUES (NOW(), ASCII(NULL));
  INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME('9999999999'));
+Warnings:
+Warning	1264	Out of range value for column 'f3' at row 1
  INSERT INTO t1 (f2,f3) VALUES (NOW(), TIME(NULL));
  INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME(99999999990));
  UPDATE t1 SET f2=NOW(), f3=FROM_UNIXTIME('9999999999') WHERE f1=1;
+Warnings:
+Warning	1264	Out of range value for column 'f3' at row 1
  SELECT f1,f2-f3 FROM t1;
  f1	f2-f3
-1	0
+1	20010909044659
  2	0
  3	0
-4	0
+4	20010909044659
  5	0
  6	0
  DROP TABLE t1;
@@ -218,13 +222,15 @@
  INSERT INTO t1 (f2,f3) VALUES (NOW(), ASCII(NULL));
  ERROR 23000: Column 'f3' cannot be null
  INSERT INTO t1 (f2,f3) VALUES (NOW(), 
COALESCE(FROM_UNIXTIME('9999999999'), "0000-00-00 00:00:00"));
+Warnings:
+Warning	1264	Out of range value for column 'f3' at row 1
  INSERT INTO t1 (f2,f3) VALUES (NOW(), TIME(NULL));
  ERROR 23000: Column 'f3' cannot be null
  INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME(99999999990));
  ERROR 23000: Column 'f3' cannot be null
  UPDATE t1 SET f2=NOW(), f3=FROM_UNIXTIME('9999999999') WHERE f1=1;
  Warnings:
-Warning	1048	Column 'f3' cannot be null
+Warning	1264	Out of range value for column 'f3' at row 1
  SELECT f1,f2-f3 FROM t1;
  f1	f2-f3
  1	20010909044659
@@ -239,26 +245,26 @@
  2038-01-19 12:14:07
  SELECT FROM_UNIXTIME(2147483648);
  FROM_UNIXTIME(2147483648)
-NULL
+2038-01-19 12:14:08
  SELECT UNIX_TIMESTAMP("2038-01-19 12:14:07");
  UNIX_TIMESTAMP("2038-01-19 12:14:07")
  2147483647
  # Overflow:
  SELECT UNIX_TIMESTAMP("2038-01-19 12:14:08");
  UNIX_TIMESTAMP("2038-01-19 12:14:08")
-0
+2147483648
  SET TIME_ZONE = "US/Pacific";
  SELECT FROM_UNIXTIME(2147483647);
  FROM_UNIXTIME(2147483647)
  2038-01-18 19:14:07
  SELECT FROM_UNIXTIME(2147483648);
  FROM_UNIXTIME(2147483648)
-NULL
+2038-01-18 19:14:08
  SELECT UNIX_TIMESTAMP('2038-01-18 19:14:07');
  UNIX_TIMESTAMP('2038-01-18 19:14:07')
  2147483647
  # Overflow:
  SELECT UNIX_TIMESTAMP('2038-01-18 19:14:08');
  UNIX_TIMESTAMP('2038-01-18 19:14:08')
-0
+2147483648
  SET TIME_ZONE = DEFAULT;

mysqltest: Result content mismatch


The result from queries just before the failure was:
2147483647
# Overflow:
SELECT UNIX_TIMESTAMP("2038-01-19 12:14:08");
UNIX_TIMESTAMP("2038-01-19 12:14:08")
2147483648
SET TIME_ZONE = "US/Pacific";
SELECT FROM_UNIXTIME(2147483647);
FROM_UNIXTIME(2147483647)
2038-01-18 19:14:07
SELECT FROM_UNIXTIME(2147483648);
FROM_UNIXTIME(2147483648)
2038-01-18 19:14:08
SELECT UNIX_TIMESTAMP('2038-01-18 19:14:07');
UNIX_TIMESTAMP('2038-01-18 19:14:07')
2147483647
# Overflow:
SELECT UNIX_TIMESTAMP('2038-01-18 19:14:08');
UNIX_TIMESTAMP('2038-01-18 19:14:08')
2147483648
SET TIME_ZONE = DEFAULT;
safe_process[71240]: Child process: 71241, exit: 1

  - the logfile can be found in 
'/<<PKGBUILDDIR>>/builddir/mysql-test/var/log/main.func_unixtime_32bits/func_unixtime_32bits.log'

Retrying test main.func_unixtime_32bits, attempt(2/3).

[ 58%] main.func_unixtime_32bits                w1  [ retry-fail ]
         Test ended at 2024-03-05 17:31:36

CURRENT_TEST: main.func_unixtime_32bits
--- /<<PKGBUILDDIR>>/mysql-test/r/func_unixtime_32bits.result	2023-12-12 
21:09:36.000000000 +0300
+++ 
/<<PKGBUILDDIR>>/builddir/mysql-test/var/1/log/func_unixtime_32bits.reject 
2024-03-05 20:31:36.312878319 +0300
@@ -12,7 +12,7 @@
  2038-01-19 06:14:07
  select from_unixtime(2147483648);
  from_unixtime(2147483648)
-NULL
+2038-01-19 06:14:08
  select from_unixtime(0);
  from_unixtime(0)
  1970-01-01 03:00:00
@@ -32,26 +32,26 @@
  2147483647
  select unix_timestamp(from_unixtime(2147483648));
  unix_timestamp(from_unixtime(2147483648))
-NULL
+2147483648
  # check for invalid dates
  # bad year
  select unix_timestamp('2039-01-20 01:00:00');
  unix_timestamp('2039-01-20 01:00:00')
-0
+2179087200
  select unix_timestamp('1968-01-20 01:00:00');
  unix_timestamp('1968-01-20 01:00:00')
  0
  # bad month
  select unix_timestamp('2038-02-10 01:00:00');
  unix_timestamp('2038-02-10 01:00:00')
-0
+2149365600
  select unix_timestamp('1969-11-20 01:00:00');
  unix_timestamp('1969-11-20 01:00:00')
  0
  # bad day
  select unix_timestamp('2038-01-20 01:00:00');
  unix_timestamp('2038-01-20 01:00:00')
-0
+2147551200
  select unix_timestamp('1969-12-30 01:00:00');
  unix_timestamp('1969-12-30 01:00:00')
  0
@@ -71,7 +71,7 @@
  # check bad date, close to the boundary (we cut them off in the very end)
  select unix_timestamp('2038-01-19 07:14:07');
  unix_timestamp('2038-01-19 07:14:07')
-0
+2147487247
  # ------ 1. func_time.test   END
  # ------ 2. time_zone.test   BEGIN
  #
@@ -84,20 +84,20 @@
  unix_timestamp('2038-01-19 04:14:07'),
  unix_timestamp('2038-01-19 04:14:08');
  unix_timestamp('1970-01-01 01:00:00')	unix_timestamp('1970-01-01 
01:00:01')	unix_timestamp('2038-01-19 04:14:07') 
unix_timestamp('2038-01-19 04:14:08')
-0	1	2147483647	0
+0	1	2147483647	2147483648
  set time_zone=default;
  # ------ 2. time_zone.test   END
  # ------ 3. time_zone2.test   BEGIN
  select convert_tz('2038-01-19 04:14:08', '+01:00', 'UTC');
  convert_tz('2038-01-19 04:14:08', '+01:00', 'UTC')
-2038-01-19 04:14:08
+2038-01-19 03:14:08
  select convert_tz('2103-01-01 04:00:00', 'MET', 'UTC');
  convert_tz('2103-01-01 04:00:00', 'MET', 'UTC')
-2103-01-01 04:00:00
+2103-01-01 03:00:00
  Will work on a 64 bits time system, no-op on 32 bits time
  select convert_tz('3001-01-18 23:59:59', 'UTC', '+01:00');
  convert_tz('3001-01-18 23:59:59', 'UTC', '+01:00')
-3001-01-18 23:59:59
+3001-01-19 00:59:59
  Will not work, beyond range of UNIX timestamp support
  select convert_tz('3001-01-19 00:00:00', 'UTC', '+01:00');
  convert_tz('3001-01-19 00:00:00', 'UTC', '+01:00')
@@ -123,12 +123,12 @@
  (32536771199.9999999);
  SELECT a, FROM_UNIXTIME(a) FROM t1;
  a	FROM_UNIXTIME(a)
-32536771199.9999990	NULL
-32536771199.9999990	NULL
-32536771199.9999991	NULL
-32536771199.9999992	NULL
-32536771199.9999993	NULL
-32536771199.9999994	NULL
+32536771199.9999990	3001-01-18 23:59:59.999999
+32536771199.9999990	3001-01-18 23:59:59.999999
+32536771199.9999991	3001-01-18 23:59:59.999999
+32536771199.9999992	3001-01-18 23:59:59.999999
+32536771199.9999993	3001-01-18 23:59:59.999999
+32536771199.9999994	3001-01-18 23:59:59.999999
  32536771199.9999995	NULL
  32536771199.9999996	NULL
  32536771199.9999997	NULL
@@ -148,7 +148,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 03:14:07	NULL	NULL	NULL	NULL
+2038-01-19 03:14:07	2038-01-19 03:14:08	2038-01-19 03:14:08.000000 
3001-01-18 23:59:59	NULL
  SET time_zone=default;
  SELECT
  FROM_UNIXTIME(2147483647) AS c1,
@@ -157,7 +157,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 06:14:07	NULL	NULL	NULL	NULL
+2038-01-19 06:14:07	2038-01-19 06:14:08	2038-01-19 06:14:08.000000 
3001-01-19 02:59:59	NULL
  SET sql_mode=time_truncate_fractional;
  SET time_zone='+00:00';
  SELECT
@@ -167,7 +167,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 03:14:07	NULL	2038-01-19 03:14:07.999999	NULL	NULL
+2038-01-19 03:14:07	2038-01-19 03:14:08	2038-01-19 03:14:07.999999 
3001-01-18 23:59:59	3001-01-18 23:59:59.999999
  SET time_zone=default;
  SELECT
  FROM_UNIXTIME(2147483647) AS c1,
@@ -176,7 +176,7 @@
  FROM_UNIXTIME(32536771199) AS c4,
  FROM_UNIXTIME(32536771199.9999999) AS c5;
  c1	c2	c3	c4	c5
-2038-01-19 06:14:07	NULL	2038-01-19 06:14:07.999999	NULL	NULL
+2038-01-19 06:14:07	2038-01-19 06:14:08	2038-01-19 06:14:07.999999 
3001-01-19 02:59:59	3001-01-19 02:59:59.999999
  SET sql_mode=default;
  # ------ 4. type_temporal_fractional.test   END
  # ------ 5 and 6. type_timestamp{_explicit}.test   BEGIN
@@ -194,15 +194,19 @@
  INSERT INTO t1 (f2,f3) VALUES (NOW(), NULL);
  INSERT INTO t1 (f2,f3) VALUES (NOW(), ASCII(NULL));
  INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME('9999999999'));
+Warnings:
+Warning	1264	Out of range value for column 'f3' at row 1
  INSERT INTO t1 (f2,f3) VALUES (NOW(), TIME(NULL));
  INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME(99999999990));
  UPDATE t1 SET f2=NOW(), f3=FROM_UNIXTIME('9999999999') WHERE f1=1;
+Warnings:
+Warning	1264	Out of range value for column 'f3' at row 1
  SELECT f1,f2-f3 FROM t1;
  f1	f2-f3
-1	0
+1	20010909044659
  2	0
  3	0
-4	0
+4	20010909044659
  5	0
  6	0
  DROP TABLE t1;
@@ -218,13 +222,15 @@
  INSERT INTO t1 (f2,f3) VALUES (NOW(), ASCII(NULL));
  ERROR 23000: Column 'f3' cannot be null
  INSERT INTO t1 (f2,f3) VALUES (NOW(), 
COALESCE(FROM_UNIXTIME('9999999999'), "0000-00-00 00:00:00"));
+Warnings:
+Warning	1264	Out of range value for column 'f3' at row 1
  INSERT INTO t1 (f2,f3) VALUES (NOW(), TIME(NULL));
  ERROR 23000: Column 'f3' cannot be null
  INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME(99999999990));
  ERROR 23000: Column 'f3' cannot be null
  UPDATE t1 SET f2=NOW(), f3=FROM_UNIXTIME('9999999999') WHERE f1=1;
  Warnings:
-Warning	1048	Column 'f3' cannot be null
+Warning	1264	Out of range value for column 'f3' at row 1
  SELECT f1,f2-f3 FROM t1;
  f1	f2-f3
  1	20010909044659
@@ -239,26 +245,26 @@
  2038-01-19 12:14:07
  SELECT FROM_UNIXTIME(2147483648);
  FROM_UNIXTIME(2147483648)
-NULL
+2038-01-19 12:14:08
  SELECT UNIX_TIMESTAMP("2038-01-19 12:14:07");
  UNIX_TIMESTAMP("2038-01-19 12:14:07")
  2147483647
  # Overflow:
  SELECT UNIX_TIMESTAMP("2038-01-19 12:14:08");
  UNIX_TIMESTAMP("2038-01-19 12:14:08")
-0
+2147483648
  SET TIME_ZONE = "US/Pacific";
  SELECT FROM_UNIXTIME(2147483647);
  FROM_UNIXTIME(2147483647)
  2038-01-18 19:14:07
  SELECT FROM_UNIXTIME(2147483648);
  FROM_UNIXTIME(2147483648)
-NULL
+2038-01-18 19:14:08
  SELECT UNIX_TIMESTAMP('2038-01-18 19:14:07');
  UNIX_TIMESTAMP('2038-01-18 19:14:07')
  2147483647
  # Overflow:
  SELECT UNIX_TIMESTAMP('2038-01-18 19:14:08');
  UNIX_TIMESTAMP('2038-01-18 19:14:08')
-0
+2147483648
  SET TIME_ZONE = DEFAULT;

mysqltest: Result content mismatch


The result from queries just before the failure was:
2147483647
# Overflow:
SELECT UNIX_TIMESTAMP("2038-01-19 12:14:08");
UNIX_TIMESTAMP("2038-01-19 12:14:08")
2147483648
SET TIME_ZONE = "US/Pacific";
SELECT FROM_UNIXTIME(2147483647);
FROM_UNIXTIME(2147483647)
2038-01-18 19:14:07
SELECT FROM_UNIXTIME(2147483648);
FROM_UNIXTIME(2147483648)
2038-01-18 19:14:08
SELECT UNIX_TIMESTAMP('2038-01-18 19:14:07');
UNIX_TIMESTAMP('2038-01-18 19:14:07')
2147483647
# Overflow:
SELECT UNIX_TIMESTAMP('2038-01-18 19:14:08');
UNIX_TIMESTAMP('2038-01-18 19:14:08')
2147483648
SET TIME_ZONE = DEFAULT;
safe_process[71381]: Child process: 71382, exit: 1

  - the logfile can be found in 
'/<<PKGBUILDDIR>>/builddir/mysql-test/var/log/main.func_unixtime_32bits/func_unixtime_32bits.log'

Test main.func_unixtime_32bits has failed 2 times, no more retries.



More information about the pkg-mysql-maint mailing list