Bug #29979 | PreparedStatement.executeUpdate returns wrong rowcount for an insert statement. | ||
---|---|---|---|
Submitted: | 23 Jul 2007 15:56 | Modified: | 23 Jul 2007 16:43 |
Reporter: | Gökhan Demir | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.0.6, 5.0.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | insert, rowcount, wrong |
[23 Jul 2007 15:56]
Gökhan Demir
[23 Jul 2007 15:58]
Gökhan Demir
Results of the "how to repeat" section: create ps returned = 0 insert ps returned = 7810893 insert statement returned = 7810893 drop ps returned = 0
[23 Jul 2007 16:02]
Mark Matthews
This is a duplicate of Bug#29692, which is a server bug. The reason it is not reproducible with the command-line client is because it asks for affected rows, while Connector/J asks for "found" rows in update counts, as that's what the JDBC specification requires.
[23 Jul 2007 16:39]
Gökhan Demir
Test case to produce the wrong rowcount.
Attachment: WrongAffectedRows.java (text/x-java), 1.96 KiB.
[23 Jul 2007 16:43]
Gökhan Demir
Sorry that I missed the previous 'duplicate' bug report.