MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Narayanan V Date:June 1 2009 7:22am
Subject:bzr commit into mysql-5.1-bugteam branch (v.narayanan:2917) Bug#45197
View as plain text  
#At file:///export/home/log/Narayanan/mysql_checkouts_bazaar/5.1_main_repository/mysql-5.1-bugteam-45197/ based on revid:zhenxing.he@stripped

 2917 Narayanan V	2009-06-01
      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.

    modified:
      storage/ibmdb2i/db2i_charsetSupport.cc
=== modified file 'storage/ibmdb2i/db2i_charsetSupport.cc'
--- a/storage/ibmdb2i/db2i_charsetSupport.cc	2009-05-17 17:20:20 +0000
+++ b/storage/ibmdb2i/db2i_charsetSupport.cc	2009-06-01 07:22:10 +0000
@@ -245,11 +245,16 @@ static int32 getNewTextDesc(const int32 
   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 in
     *outCcsid = 1148;
     DBUG_RETURN(0);
   }
+  else if ((inCcsid == 1250) && (inEncodingScheme == 0x1100))
+  {
+    *outCcsid = 1153;
+    DBUG_RETURN(0);
+  }
 
   if (!ptrInited)
   {  


Attachment: [text/bzr-bundle] bzr/v.narayanan@sun.com-20090601072210-7k9ea0xgqt11dp2b.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (v.narayanan:2917) Bug#45197Narayanan V1 Jun