Bug #107222 | ClientPreparedStatement.toString() no longer interpolates byte arrays | ||
---|---|---|---|
Submitted: | 5 May 2022 14:34 | Modified: | 27 Sep 2022 21:58 |
Reporter: | Shaun Brockhoff | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 8.0.29 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[5 May 2022 14:34]
Shaun Brockhoff
[9 May 2022 10:15]
Filipe Silva
Thank you for your interest in MySQL Connector/J and for this bug report. It was verified as described.
[27 Jul 2022 2:48]
ChangXu Si
The null value in 8.0.28 will be displayed "null" but in 8.0.29 whil be displayed ** BYTE ARRAY DATA ** In version 8.0.30, this bug still exists.
[27 Sep 2022 21:58]
Daniel So
Posted by developer: Added the following entry to the C/N 8.0.31 changelog: " Before release 8.0.29, Connector/J always interpolated byte arrays as hexadecimal literals when obtaining a prepared statement's string representation by the toString() method. Since 8.0.29, all byte array values were displayed as byte array data when converted to strings. The same is also true for null values, which were also displayed as byte values instead of NULL. To allow different ways to display byte array data and null values, a new connection property, maxByteArrayAsHex, has been introduced: byte arrays shorter than the value of maxByteArrayAsHex are now shown as hexadecimal literals like before release 8.0.29. Any byte arrays longer than this value are interpolated generically as byte array data."
[6 Oct 2022 22:21]
Daniel So
Posted by developer: Updated the changelog entry to the following: "Before release 8.0.29, Connector/J always interpolated byte arrays as hexadecimal literals when obtaining a prepared statement's string representation by the toString() method. Since 8.0.29, all byte array values were displayed as ** BYTE ARRAY DATA ** when converted to strings. The same is also true for null values. To allow different ways to display byte array data and null values, a new connection property, maxByteArrayAsHex, has been introduced: byte arrays shorter than the value of maxByteArrayAsHex are now shown as hexadecimal literals like before release 8.0.29. Any byte arrays longer than this value are interpolated generically as ** BYTE ARRAY DATA **."