[MDEV-32063] view of timestamp returning datetime /* 5.3 */ format Created: 2023-09-01  Updated: 2023-09-01

Status: Open
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.5.22
Fix Version/s: 10.5

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: regression, regression-10.4

Issue Links:
Relates
relates to MDEV-19906 Show internal type for TIMESTAMP, DAT... Closed

 Description   

From https://mariadb.com/kb/en/converting-datetime-to-new-temporal-format/,

10.3,10.4

MariaDB [test]> CREATE OR REPLACE VIEW v1 AS SELECT timestamp'2001-01-01 10:10:10' AS c1, now() AS c2;
Query OK, 0 rows affected (0.001 sec)
 
MariaDB [test]> SHOW COLUMNS IN v1;
+-------+----------+------+-----+---------------------+-------+
| Field | Type     | Null | Key | Default             | Extra |
+-------+----------+------+-----+---------------------+-------+
| c1    | datetime | NO   |     | 0000-00-00 00:00:00 |       |
| c2    | datetime | NO   |     | 0000-00-00 00:00:00 |       |
+-------+----------+------+-----+---------------------+-------+

10.5

CREATE OR REPLACE VIEW v1 AS SELECT timestamp'2001-01-01 10:10:10' AS c1, now() AS c2;
SHOW COLUMNS IN v1;
+-------+----------------------------+------+-----+---------------------+-------+
| Field | Type                       | Null | Key | Default             | Extra |
+-------+----------------------------+------+-----+---------------------+-------+
| c1    | datetime /* mariadb-5.3 */ | NO   |     | 0000-00-00 00:00:00 |       |
| c2    | datetime /* mariadb-5.3 */ | NO   |     | 0000-00-00 00:00:00 |       |
+-------+----------------------------+------+-----+---------------------+-------+



 Comments   
Comment by Daniel Black [ 2023-09-01 ]

"And the problem is that temporary table columns do not respect @@mysql56_temporal_format - they always use the old format."

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