[MDEV-4843] Wrong data type for TIMESTAMP('2001-01-01','10:10:10') Created: 2013-08-05  Updated: 2013-09-16  Resolved: 2013-09-16

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.3, 5.5.32, 5.3.12
Fix Version/s: 10.0.5, 5.5.33, 5.3.13

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-4724 Some temporal functions do not preser... Closed

 Description   

This script

drop table if exists t1;
create table t1 as  select timestamp('2001-01-01','10:10:10') as a;
show columns from t1;

creates a VARCHAR(26) column:

+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| a     | varchar(26) | YES  |     | NULL    |       |
+-------+-------------+------+-----+---------+-------+

The expected result is a DATETIME column.

Note: MySQL-5.6 correctly creates a DATETIME column in this scenario.



 Comments   
Comment by Alexander Barkov [ 2013-08-16 ]

This problem should be fixed after MDEV-4724, to avoid a field of type TIME(6)
being always created, even with a smaller number of fractional digits.

Comment by Alexander Barkov [ 2013-09-16 ]

Fixed in 5.3.13 and 5.5.53

Generated at Thu Feb 08 06:59:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.