Bug #45554 Connector/J does not encode binary data if useServerPrepStatements=false
Submitted: 17 Jun 2009 11:17 Modified: 6 May 2016 11:26
Reporter: Sergei Glukhov Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:any OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[17 Jun 2009 11:17] Sergei Glukhov
Description:
There is a problem with multi-byte character sets and binary data
(for example, 'gbk' charset). Connector/J does not encode binary data if useServerPrepStatements=false. It leads to 'syntax error' failure.
But if 'useServerPrepStatements=true' then binary data is encoded into
hex representation and no errors happen.

How to repeat:
see Bug#36680, Csc25412.java test case

Suggested fix:
In case of multi-byte charsets binary data should always be
encoded as hex.
[17 Jun 2009 11:19] Tonci Grgin
Todd, Gluh, I'll assign Todd here as he's following first report.