[CONJ-299] PreparedStatement.setObject(Type.BIT, "1") should register as true. Created: 2016-05-24 Updated: 2016-08-23 Resolved: 2016-08-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.4.5 |
| Fix Version/s: | 1.5.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Hidekatsu Izuno | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Java8 |
||
| Description |
|
I called PreparedStatement.setObject(Type.BIT, "1"). I expected this value registered true. I find the code at github. I found the next code in AbstractMariaDbPrepareStatement.java:781
Types.BIT must be handled as a numeric type than a boolean type but the compatibility is important. So I think the next code is more appropriate.
And I tested on MySQL Connector/J. It handled Types.BIT as a numeric type. |
| Comments |
| Comment by Diego Dupin [ 2016-08-23 ] |
|
fixed with commit : https://github.com/MariaDB/mariadb-connector-j/commit/18fac0608b6b100b0811729b146194743b1b7a53 |