[CONJ-108] Statement.getGeneratedKeys() returns a non-empty ResultSet if AUTO_INCREMENT was unaffected Created: 2014-08-29 Updated: 2014-10-22 Resolved: 2014-10-22 |
|
| 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 | ||
| Environment: |
I used Windows 8 with MariaDB server 5.5.33a and Java 7. |
||
| Attachments: |
|
| Description |
|
How to reproduce: Actual: That is: the ResultSet is not empty, it contains one row with the value 0 for the first column. The value 0 is just a dummy value and does not reflect any value of the key. Expected: Discussion: On the code I’m working on this feature is however used. We previously used Mysql JDBC driver and are now switching to MariaDB. My attached test case passes with Mysql JDBC driver (the ResultSet is empty). It would be good for me if MariaDB behaves the same. |
| Comments |
| Comment by Massimo Siani (Inactive) [ 2014-09-10 ] |
|
I would add the following if statement to MySQLStatement.getGeneratedKeys(): public ResultSet getGeneratedKeys() throws SQLException { ... The test cases pass in this case. |