Bug #2787 | rs.getString skips leading zeroes for a zerofill column with PreparedStatement | ||
---|---|---|---|
Submitted: | 14 Feb 2004 1:51 | Modified: | 1 Mar 2004 8:46 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 3.1 | OS: | Any (Any) |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[14 Feb 2004 1:51]
[ name withheld ]
[14 Feb 2004 6:53]
Mark Matthews
The issue arises from the fact that the server is returning this value as a binary-encoded integer because of the prepared statement, without returning any information about the zerofill attribute of the value, so the driver can not determine this. When you use a regular statement (e.g. via executeQuery(sql)), the server returns _all_ values as strings.
[14 Feb 2004 7:55]
Mark Matthews
After further examination, I believe I can detect this in the driver. This will be fixed for Connector/J 3.1.2.
[1 Mar 2004 0:25]
[ name withheld ]
I've checked against mysql-connector-java-3.1-nightly-20040229. It seems to be corrected. You can close this bug.