[CONJ-113] Vendor code is not properly propagated to parent BatchUpdateException for executeBatch() Created: 2014-09-12 Updated: 2014-09-23 Resolved: 2014-09-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.7 |
| Fix Version/s: | 1.1.8 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Lennart Schedin | Assignee: | Massimo Siani (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
How to reproduce:
Actual:
The vendor code is 0. In other words it is not set. Expected: Compare with the test case testNoSuchTable(). In this case the error could should be 1146 as described at http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html Analysis and suggested fix: Feel free to add my test class to the MariaDB source code. |
| Comments |
| Comment by Lennart Schedin [ 2014-09-15 ] |
|
The method MySQLStatement.executeBatch() probably also needs to be fixed. |
| Comment by Massimo Siani (Inactive) [ 2014-09-15 ] |
|
Can be found here |
| Comment by Lennart Schedin [ 2014-09-16 ] |
|
The fix looked fine! I also searched in the source code for other places where this might be missing (I searched for the usage of constructors SQLException (and subclasses) that does not set the vendor code). I could only find the two places that now has been fixed. The JUnit tests looked a bit duplicated? Does the same tests need to be both in PreparedStatementTest.java and StatementTest.java? |