Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.0.3, 3.0.4, 3.0.5, 3.0.6
Description
In version 2.x setting a SQL parameter value for a BOOLEAN field insert/update as follows was accepted:
try( final PreparedStatement update = connection.prepareStatement( "UPDATE tests.datatypes SET booleanField = ?" ) ) { |
update.setObject( 1, "true", Types.BOOLEAN ); |
update.execute();
|
}
|
Note that the value is a quoted string.
In 3.x this results in:
Incorrect integer value: 'true' for column `tests`.`datatypes`.`booleanField` at row 1 |
java.sql.SQLSyntaxErrorException: (conn=11) Incorrect integer value: 'true' for column `tests`.`datatypes`.`booleanField` at row 1 |
at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:280) |
at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:368) |
at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:137) |
at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:824) |
at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:763) |
at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:682) |
at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:625) |
at org.mariadb.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:95) |
at org.mariadb.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:265) |
...
|