Bug #15346 | SyncProviderException with CachedRowSet when updating TINYINT | ||
---|---|---|---|
Submitted: | 30 Nov 2005 11:16 | Modified: | 20 Dec 2005 18:39 |
Reporter: | Jamie Garton | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 5.0.15-nt | OS: | Windows (Windows XP Pro SP2) |
Assigned to: | CPU Architecture: | Any |
[30 Nov 2005 11:16]
Jamie Garton
[1 Dec 2005 20:21]
Vasily Kishkin
Thanks for the bug report. I was able to reproduce the bug.
[19 Dec 2005 22:53]
Mark Matthews
I'm asking Sun whether they can help out with this, as they don't ship source for their CachedRowset implementation, and it seems to be related to their implementation. It seems that a workaround is to _not_ use a TINYINT field. If the TINYINT field is changed to an INT, the testcase works. If you debug the SQL that Sun's CachedRowset provider creates, the row exists as it expects, but the way it compares it doesn't work, which causes the synchronization failure. We'll see if we get any input from Sun before debugging this further, as unfortunately, it's a black box once you're inside their implementation.
[20 Dec 2005 18:39]
Mark Matthews
I've spoken with the lead for Sun's RowSET RI, and this is indeed a bug with their implementation and how it handles TINYINT values (it maps them to a Byte instance internally, and then eventually compares them with .getObject() on the same column, which returns an Integer as required by the JDBC API, and then fails). I'll update this with a bug number from Sun when I get one. Currently, the workaround is to use any integer type that is larger than TINYINT.
[20 Dec 2005 19:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/298