Bug #11388 | behavior of Blob.getString() changed from 3.1.6 to 3.1.8 | ||
---|---|---|---|
Submitted: | 16 Jun 2005 15:39 | Modified: | 17 Jun 2005 5:46 |
Reporter: | Bryan Hess | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 3.1.8 | OS: | Linux (linux (Red Hat EL3)) |
Assigned to: | CPU Architecture: | Any |
[16 Jun 2005 15:39]
Bryan Hess
[16 Jun 2005 16:22]
Mark Matthews
There is no .toString() method implemented for our implementation of java.sql.Blob in either 3.1.6, 3.1.7 or 3.1.8. Are you referring to ResultSet.getString(someBlobColumnIndexOrName) output changing? If so, that's related to this change in 3.1.8: "Fixed BUG#9236, a continuation of BUG#8868, where functions used in queries that should return non-string types when resolved by temporary tables suddenly become opaque binary strings (work-around for server limitation). Also fixed fields with type of CHAR(n) CHARACTER SET BINARY to return correct/matching classes for RSMD.getColumnClassName() and ResultSet.getObject()." You shouldn't really have ever been able to use getString() on a BLOB column, since it has no character encoding, there's no safe way to convert it to a string that doesn't involve corruption or data loss. Please provide an example of the code that shows _exactly_ what you're referring to so we can provide a better answer.
[16 Jun 2005 16:58]
Bryan Hess
Yes, you're right-- resultSet.getString(someBlobColumn) is what I was doing. I will adjust my code accordingly-- thanks!
[17 Jun 2005 5:46]
Vasily Kishkin
So....as far as I can understand I can close the bug.