Bug #26371 | UpdatableResultSet.moveToInsertRow throws ClassCastException | ||
---|---|---|---|
Submitted: | 14 Feb 2007 15:50 | Modified: | 13 Apr 2007 21:40 |
Reporter: | Christopher Schultz | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 3.1.13 | OS: | Linux (Linux 2.6 kernel) |
Assigned to: | CPU Architecture: | Any |
[14 Feb 2007 15:50]
Christopher Schultz
[11 Apr 2007 11:45]
Tonci Grgin
Hi Christopher and thanks for your report. I too have my doubts regarding solution in Bug#19451 which is forwarded to c/J team for further clarification. Can you tell me in what way is this report different than Bug#26371 since I'm inclined to close it as duplicate and continue discussion in original report?
[11 Apr 2007 15:24]
Tonci Grgin
Sorry, my mistake. It should be Bug#19451... Anyway, I've done some consults and this *is* a bug although the spec are not clear about "where" the insert row "lives", but you should be able to insert data even in result sets that aren't empty. There are some corner cases / gray areas though... Setting this report to duplicate of Bug#19451 which is now "Verified".
[13 Apr 2007 21:40]
Christopher Schultz
Tonci, I believe that Bug#19451 and this one are the same thing. I argue that neither have been fixed. There's no reason that these problems should cause a ClassCastException. It looks like in either case the ResultSet is beyond the last record in the result set. Calling ResultSet.moveToInsertRow should -- at most -- throw a SQLException if the cursor state is bad. Throwing ClassCastException in production code is unacceptable. Looking at the source to Connector/J, I can't even figure out why the ClassCastException is being thrown. I have upgraded to a 5.x version of Connector/J and Java 1.5 since this report was filed and the problems have gone away. It is even possible that it was a JVM problem. <shrug> I'm a little disappointed that no bug I've ever filed with MySQL has been resolved. :(
[14 Apr 2007 10:27]
Tonci Grgin
Christopher, I appologize for the delay. Will ask c/J team for update on status.