[CONJ-1001] For UUID column, the type name in metadata should not be CHAR Created: 2022-08-19  Updated: 2022-09-02  Resolved: 2022-09-02

Status: Closed
Project: MariaDB Connector/J
Component/s: metadata
Affects Version/s: 3.0.7
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Minglei Lee Assignee: Diego Dupin
Resolution: Duplicate Votes: 0
Labels: uuid
Environment:

Server: Win2019 + mariadb-10.7.5-winx64, Client: MacOS + mariadb-java-client 3.0.7


Issue Links:
Duplicate
duplicates CONJ-899 Support UUID Object Closed

 Description   

Consider the following code:

SQL

create table uuid_test (id uuid);

Java

var rs = stmt.executeQuery("select * from uuid_test");
var md = rs.getMetaData();
var s = md.getColumnTypeName(1) + ", " + md.getColumnType(1) + ", " + md.getColumnClassName(1);

For MariaDB, the result of s is "CHAR, 1, java.lang.String".
For PostgreSQL, the result of s is "uuid, 1111, java.util.UUID".

The latter is more reasonable. For the former, we does not know it's a UUID column or a CHAR column with size = 36.



 Comments   
Comment by Diego Dupin [ 2022-09-02 ]

This will be in next version 3.1 with UUID support

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