[MDEV-2464] LP:769583 - 5.1-micro length of TIME datatype is wrong Created: 2011-04-23  Updated: 2020-09-08  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug769583.xml    

 Description   

The length of TIME column is reported as 9 in this 5.1-micro, but 8 otherwise.

To reproduce,
mysql -uroot -e "select time('01:01:01')"

It reports :
Field 1: `time('01:01:01')`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: TIME
Collation: binary (63)
Length: 9
Max_length: 8
Decimals: 31
Flags: BINARY

Length field should be 8, not 9



 Comments   
Comment by Vladislav Vaintroub [ 2011-04-23 ]

Re: 5.1-micro length of TIME datatype is wrong
Sorry, the correct command to reproduce is of course
mysql -uroot -e "select time('01:01:01')" --column-type-info

I forgot --column-type-info when in the description.

Comment by Sergei Golubchik [ 2011-04-25 ]

Re: 5.1-micro length of TIME datatype is wrong
9 is correct, 8 was a bug.

"length" in the ouput of --column-type-info is the max width of the data. According to the manual, the maximal value for TIME is 838:59:59. Thus 9 is correct.

Comment by Rasmus Johansson (Inactive) [ 2011-04-25 ]

Launchpad bug id: 769583

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