[CONJ-255] Resultset.getBoolean result on value that differ 0 and 1 Created: 2016-02-17  Updated: 2016-02-20  Resolved: 2016-02-20

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 1.3.2, 1.3.1, 1.3.3, 1.3.4, 1.3.5
Fix Version/s: 1.3.6

Type: Task Priority: Minor
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

Driver return false when using Resultset.getBoolean on tinyInt with value > 1.
(That differ from the mysql driver which return true is this case.)

At the same time :

mysql> SELECT IF(0, 'true', 'false');
+------------------------+
| IF(0, 'true', 'false') |
+------------------------+
| false                  |
+------------------------+
 
mysql> SELECT IF(1, 'true', 'false');
+------------------------+
| IF(1, 'true', 'false') |
+------------------------+
| true                   |
+------------------------+
 
mysql> SELECT IF(2, 'true', 'false');
+------------------------+
| IF(2, 'true', 'false') |
+------------------------+
| true                   |
+------------------------+
 

This is inconsistent, driver must handle the same way



 Comments   
Comment by Diego Dupin [ 2016-02-20 ]

done with commit : https://github.com/MariaDB/mariadb-connector-j/commit/16ad03767a0f1b3a39b1ef867e69122e47e4451d

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