1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/sql
Aleksey Midenkov dddbd5ff42 MDEV-41344 Timestamp conversion does not work for TRADITIONAL mode
Field_temporal::get_copy_func() returns do_field_datetime whenever the
session's sql_mode has NO_ZERO_DATE or NO_ZERO_IN_DATE (e.g. under
sql_mode=TRADITIONAL), or when the two fields are not eq_def(),
regardless of whether the field is a system-versioned
row_end.

get_copy_func() checked for that value and returned early, before ever
reaching the VERS_ROW_END check that installs
do_field_versioned_timestamp. So an ALTER TABLE .. FORCE meant to
convert an old-format row_end silently copied the value unchanged
instead: the conversion check correctly demanded a copy, but the copy
step never applied it, with no error or warning.

The fix checks the row_end conversion need first, independently of
what Field_temporal::get_copy_func() picked. row_end is
server-maintained and never zero, so NO_ZERO_DATE does not apply to
it.

Tested by "traditional" combination in old_timestamp.test, the test
restores real pre-11.5 row_end fixtures and runs mariadb-upgrade
--force.
2026-10-01 23:01:24 +03:00
..
2026-05-08 08:11:03 +02:00
2025-10-25 00:19:11 +07:00
…
2026-08-19 11:28:01 +02:00
2024-11-10 19:22:21 +01:00
2025-07-28 21:29:29 +02:00
2024-11-05 14:00:48 -08:00
2026-07-29 12:27:46 +02:00
…
2025-09-29 18:25:09 +03:00
…
…
…
…
2024-12-02 11:35:34 +02:00
2024-12-02 17:51:17 +02:00
2026-01-31 14:08:54 +01:00
2024-10-30 15:11:17 +01:00
…
2026-07-29 12:27:46 +02:00
2026-08-19 11:28:01 +02:00
2024-12-02 11:35:34 +02:00
2026-04-20 13:16:55 +10:00
2026-03-23 11:57:44 +02:00
…
…
2024-11-08 07:17:00 +01:00
2026-04-20 13:16:55 +10:00
2026-06-15 15:15:10 +02:00
2025-09-04 18:08:39 +03:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2024-11-29 13:43:17 +02:00
…
…
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2024-12-05 10:11:58 +01:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2026-08-19 11:28:01 +02:00
2026-01-31 14:08:54 +01:00
2026-08-19 11:28:01 +02:00
2026-05-08 08:11:03 +02:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2026-01-31 14:08:54 +01:00
2026-06-26 13:46:45 +03:00
2026-01-31 14:08:54 +01:00
2026-01-31 14:08:54 +01:00
2026-04-01 15:03:59 +03:00
2026-01-28 14:22:20 +01:00
2024-12-02 11:35:34 +02:00
2026-07-29 12:27:46 +02:00
2024-12-02 17:51:17 +02:00
2024-07-08 22:40:16 +02:00
2024-06-17 12:02:03 +03:00
2024-11-05 14:00:50 -08:00
…
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-05-08 08:11:03 +02:00
…
…
2025-09-29 18:25:09 +03:00
2026-04-01 15:03:59 +03:00
…
2024-10-03 15:59:20 +10:00
2024-12-02 11:35:34 +02:00
…
…
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2026-08-19 11:28:01 +02:00
2026-01-31 14:08:54 +01:00
2026-01-31 14:08:54 +01:00
2025-09-29 18:25:09 +03:00
2026-08-19 11:28:01 +02:00
2026-07-28 13:14:38 +02:00
2024-12-02 11:35:34 +02:00
2026-07-28 13:14:38 +02:00
2026-05-08 08:00:01 +02:00
2026-08-19 11:28:01 +02:00
2026-01-31 14:08:54 +01:00
2026-05-08 08:11:03 +02:00
2025-09-29 18:25:09 +03:00
2025-09-29 18:25:09 +03:00
2024-07-22 15:14:50 +02:00
2026-05-08 08:11:03 +02:00
2026-05-08 08:00:01 +02:00
2026-05-08 08:11:03 +02:00
2026-06-15 15:15:10 +02:00
2026-07-29 12:27:46 +02:00
2026-06-15 15:15:10 +02:00
2025-09-29 18:25:09 +03:00
2026-08-19 08:40:05 +02:00
2026-08-19 08:40:05 +02:00
2026-06-15 15:15:10 +02:00
2026-06-15 15:15:10 +02:00
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-03-23 11:57:44 +02:00
2025-11-04 12:39:27 +01:00
2025-11-04 12:39:27 +01:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2026-05-08 08:11:03 +02:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2024-12-02 17:51:17 +02:00
2026-08-19 11:28:01 +02:00
2026-01-05 20:34:44 +01:00
2025-09-04 18:08:39 +03:00
2026-08-19 11:28:01 +02:00
2025-02-06 16:46:36 +01:00
2026-04-20 13:16:55 +10:00
2024-06-24 13:09:47 +03:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-06-15 15:15:10 +02:00
2026-06-15 15:15:10 +02:00
2024-11-29 13:43:17 +02:00
2026-08-19 11:28:01 +02:00
2026-05-08 08:11:03 +02:00
2025-09-29 18:25:09 +03:00
2026-04-01 15:03:59 +03:00
2024-12-02 17:51:17 +02:00
2026-08-19 11:28:01 +02:00
2026-01-31 14:08:54 +01:00
2026-01-05 20:34:44 +01:00
2026-07-29 12:27:46 +02:00
2024-10-03 13:24:43 +03:00
2026-03-23 11:57:44 +02:00
2026-06-26 13:46:45 +03:00
2026-01-05 20:34:44 +01:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2025-03-03 11:07:56 +02:00
2026-03-17 18:57:42 +01:00
2026-08-19 11:28:01 +02:00
…
2026-04-01 15:03:59 +03:00
2025-09-29 18:25:09 +03:00
2025-09-29 18:25:09 +03:00
2024-06-27 10:26:09 +03:00
2025-01-09 09:41:38 +02:00
2024-10-30 15:11:17 +01:00
2024-12-02 17:51:17 +02:00
2026-07-29 12:27:46 +02:00
2025-09-19 12:31:14 +03:00
2025-09-29 18:25:09 +03:00
2025-09-04 18:08:39 +03:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2025-09-29 18:25:09 +03:00
2026-05-08 08:11:03 +02:00
2026-08-19 11:28:01 +02:00
2026-01-31 14:08:54 +01:00
2024-07-03 12:45:30 +02:00
2026-08-19 11:28:01 +02:00
2025-01-09 09:41:38 +02:00
2026-07-29 12:27:46 +02:00
2024-11-05 14:00:47 -08:00
2024-12-02 17:51:17 +02:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-06-15 15:15:10 +02:00
2026-04-20 13:16:55 +10:00
2025-09-29 18:25:09 +03:00
2026-08-19 11:28:01 +02:00
2026-03-23 11:57:44 +02:00
2026-07-29 12:27:46 +02:00
2026-08-19 08:40:05 +02:00
2026-07-28 13:14:38 +02:00
2026-07-29 12:27:46 +02:00
2025-02-11 20:29:43 +01:00
2025-04-02 14:07:01 +03:00
2026-05-08 08:00:01 +02:00
…
2026-05-08 08:11:03 +02:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2024-12-02 17:51:17 +02:00
2024-12-02 17:51:17 +02:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-06-15 15:15:10 +02:00
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-08-19 11:28:01 +02:00
2026-08-19 08:40:05 +02:00
2026-08-19 11:28:01 +02:00
2026-07-29 12:27:46 +02:00
2025-09-29 18:25:09 +03:00
2026-03-23 11:57:44 +02:00
2025-09-04 18:08:39 +03:00
2024-06-24 13:09:47 +03:00
2025-07-28 21:29:29 +02:00
…
2025-09-29 18:25:09 +03:00
2024-12-02 17:51:17 +02:00
2024-12-02 11:35:34 +02:00
2026-08-19 11:28:01 +02:00
2024-05-21 19:38:51 +02:00
2025-11-28 12:56:27 +02:00
2025-11-28 12:56:27 +02:00
2024-06-27 10:26:09 +03:00
2026-08-19 11:28:01 +02:00
2026-06-21 15:32:20 +02:00
2026-08-19 08:40:05 +02:00
2024-10-03 13:24:43 +03:00
2024-09-09 13:50:38 +03:00
2026-08-19 11:28:01 +02:00
2026-01-31 14:08:54 +01:00
2025-03-27 08:01:47 +02:00
2026-07-29 12:27:46 +02:00
2026-07-29 12:27:46 +02:00
2026-08-19 08:40:05 +02:00
2026-04-01 10:49:05 +03:00
2025-07-28 19:40:10 +02:00