Bug#45197 cp1250 character set with IBMDB2I generates 2027 error
Running a SELECT query over an IBMDB2I table with a cp1250 character set was producing an error 2027 (ibmdb2i error 2027: Error converting single-byte sort sequence to UCS-2). The QMY_DESCRIBE_RANGE API was returning error 2027 to the storage engine because the CCSID used for a cp1250 column (870) does not match the CCSID used by the DB2 sort sequences associated with cp1250_* collations (1153). This was because the storage engine relies on a set of system APIs to determine which CCSID value most closely matches a particular MySQL character set. However, in the case of cp1250, the system is returning CCSID 870, which does not have a codepoint for the euro symbol, making it an incorrect match. This patch overrides the selection of a compatible CCSID to always return 1153 for cp1250. storage/ibmdb2i/db2i_charsetSupport.cc: Bug#45197 cp1250 character set with IBMDB2I generates 2027 error override the selection of a compatible CCSID to always return 1153 for cp1250.
This commit is contained in:
parent
76e12894dc
commit
094ddf2266
@ -245,11 +245,16 @@ static int32 getNewTextDesc(const int32 inType,
|
||||
else if ((inType == Qlg_TypeAS400CCSID) && (outType == Qlg_TypeAix41))
|
||||
{
|
||||
// Override non-standard charsets
|
||||
if (unlikely(strcmp("1148", in) == 0))
|
||||
if (strcmp("1148", in) == 0)
|
||||
{
|
||||
strcpy(out, "IBM-1148");
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else if (unlikely(strcmp("1153", in) == 0))
|
||||
{
|
||||
strcpy(out, "IBM-1153");
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
}
|
||||
|
||||
char argBuf[sizeof(ArgList)+15];
|
||||
@ -583,6 +588,11 @@ int32 getAssociatedCCSID(const uint16 inCcsid, const int inEncodingScheme, uint1
|
||||
*outCcsid = 1148;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else if ((inCcsid == 1250) && (inEncodingScheme == 0x1100))
|
||||
{
|
||||
*outCcsid = 1153;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
if (!ptrInited)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user