Bug #29356 Wrong result from CONCAT function if character set SJIS is used
Submitted: 26 Jun 2007 9:18 Modified: 3 May 2011 14:17
Reporter: Sveta Smirnova Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:3.0, 3.1, 5.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: regression

[26 Jun 2007 9:18] Sveta Smirnova
Description:
If issue query "select CONCAT(12,'ヶ月')" with program using Connector/J garbage result is provided.

Bug doesn't exists in version 3.0.11

Workaround: use query "select CONCAT('12','ヶ月')" or "select CONCAT(cast(12 as char),'ヶ月')" instead of original one.

How to repeat:
See description
[3 May 2011 14:17] Mark Matthews
This is the famous (infamous) server returns wrong types for CONCAT of a number and a string. One has to use the (cast) form for this to work, the driver can't tell what the real type is.
[4 May 2011 5:24] Tonci Grgin
Sveta, this is really an old old problem, check Bug#27633 or Bug#27030 for example. Root cause is Bug#10491.