[CONJ-1063] UNSIGNED_ATTRIBUTE column is always true Created: 2023-03-06  Updated: 2023-03-16  Resolved: 2023-03-10

Status: Closed
Project: MariaDB Connector/J
Component/s: metadata
Affects Version/s: 2.7.8, 3.1.2
Fix Version/s: 2.7.9, 3.1.3

Type: Bug Priority: Major
Reporter: MrLetsplay Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None
Environment:

Fedora Linux, OpenJDK 11 (java-11-openjdk-11.0.17.0.8-1.fc37.x86_64)


Attachments: Java Source File Bugged.java    

 Description   

When retrieving type metadata from the database using getTypeInfo(), the boolean value of the UNSIGNED_ATTRIBUTE column is always true.

Sample code to reproduce the issue (with database running on localhost):

Connection con = DriverManager.getConnection("jdbc:mariadb://localhost:3306/database?user=user&password=password");
ResultSet typeInfo = con.getMetaData().getTypeInfo();
while(typeInfo.next()) {
	System.out.println(typeInfo.getString("TYPE_NAME") + ": " + typeInfo.getBoolean("UNSIGNED_ATTRIBUTE"));
}

This outputs the type names of all data types and the UNSIGNED_ATTRIBUTE being true for all of them, regardless of them having the UNSIGNED attribute or not.


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