Bug #45554 Connector/J does not encode binary data if useServerPrepStatements=false
Submitted: 17 Jun 2009 11:17 Modified: 4 Jul 19:21
Reporter: Sergei Glukhov Email Updates:
Status: Won't fix 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.
[4 Jul 19:21] Filipe Silva
Not a bug in Connector/J — it should be addressed on the server side.

Please follow up in Bug#118589.