[MDEV-2207] LP:740973 - Connector/J does not return sub-second precision of fields when retrieving database metadata Created: 2011-03-23 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The metadata returned by this.conn.getMetaData() appears to have hard-coded values for COLUMN_SIZE when it comes to temporal fields. For TIMESTAMP for example, 19 is always returned regardless of how many precision digits there are. This happens regardless of whether the "useInformationSchema" property is set on the connection. junit test case: public void testTableMetadata() throws SQLException { createTable("ms_metadata", "(ts0 TIMESTAMP(0), ts3 TIMESTAMP(3))"); this.rs.next(); this.rs.next(); The last assert will fail. Same applies to DATETIME and TIME types. |
| Comments |
| Comment by Sergei Golubchik [ 2011-03-23 ] |
|
Re: Connector/J does not return sub-second precision of fields when retrieving database metadata |
| Comment by Rasmus Johansson (Inactive) [ 2011-03-23 ] |
|
Launchpad bug id: 740973 |