[CONJ-381] getProcedureColumns returns NULL as TIMESTAMP/DATETIME precision instead of 19 Created: 2016-10-28  Updated: 2016-12-15  Resolved: 2016-11-07

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 1.5.4
Fix Version/s: 1.5.5

Type: Bug Priority: Minor
Reporter: Yekaterina Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux Kernel-3.10.0-glibc-2.17 x86_64 64bit


Attachments: File repro1.class     Java Source File repro1.java     Text File repro1.log     File repro2.class     Java Source File repro2.java     Text File repro2.log     Text File setup.txt    
Issue Links:
Relates
relates to CONJ-401 Unknown column 'DATETIME_PRECISION' i... Closed

 Description   

getProcedureColumns returns NULL as TIMESTAMP/DATETIME precision instead of 19,
MySQL getProcedureColumns returns PRECISION=19.
Both MairaDB and MySQL getColumns return COLUMN_SIZE=19.



 Comments   
Comment by Diego Dupin [ 2016-10-28 ]

thanks for reporting @Yekaterina !

Issue confirmed.
I must check further, but according to javadoc "https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html"

The precision of a Timestamp object is calculated to be either: 19 , which is the number of characters in yyyy-mm-dd hh:mm:ss, 20 + s , which is the number of characters in the yyyy-mm-dd hh:mm:ss.[fff...] and s represents the scale of the given Timestamp, its fractional seconds precision.

so for example precision for timestamp(0) must be 19, timestamp(6) must be 26.

Generated at Thu Feb 08 03:15:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.