[CONJ-273] since 1.3.7 : You need to set exactly 1 parameters on the prepared statement Created: 2016-04-02 Updated: 2016-04-04 Resolved: 2016-04-04 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.4.0, 1.3.7 |
| Fix Version/s: | 1.4.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | sjachym | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
After MariaDB Connector/Java (CONJ) version 1.3.6 (since 1.3.7 and 1.4.0), the "INSERT INTO my_table (my_col) VALUES ('my_val')" failed : {{ Exception in thread "main" java.sql.SQLException: You need to set exactly 1 parameters on the prepared statement And for insert multiple rows insert statement "INSERT INTO my_table (my_col) VALUES ('my_val1'),('my_val2')", failed also : {{Exception in thread "main" java.sql.SQLException: You need to set exactly 1 parameters on the prepared statement Like the first case , CONJ is adding a "null" ( only after the first values declaration ), and broke the statement ! Tests with mariadb-java-client-1.3.2.jar to mariadb-java-client-1.4.0.jar private String urlJdbc = "jdbc:mysql://mariadb.devel/myDb"; psUpdate = connectionSQL.prepareStatement("INSERT INTO my_table (my_col) VALUES ('my_val1'),('my_val2')"); |
| Comments |
| Comment by Diego Dupin [ 2016-04-04 ] |
|
reproduced and corrected by commit : https://github.com/MariaDB/mariadb-connector-j/commit/968f92b745e767efdb10ec2ca4fd2819a4239c7e |