Bug#45793 macce charset causes error with IBMDB2I

Creating an IBMDB2I table with the macce character set
is successful, but any attempt to insert data into the
table was failing.

This was happening because the character set name "macce"
is not a valid iconv descriptor for IBM i PASE. This patch
adds an override to convertTextDesc to use the equivalent
valid iconv descriptor "IBM-1282" instead.

mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45793.result:
  Bug#45793 macce charset causes error with IBMDB2I
  
  Result file for the test case.
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45793.test:
  Bug#45793 macce charset causes error with IBMDB2I
  
  Add a testcase for the macce charater set.
storage/ibmdb2i/db2i_charsetSupport.cc:
  Bug#45793 macce charset causes error with IBMDB2I
  
  The character set name "macce" is not a valid iconv
  descriptor for IBM i PASE. Add an override to convertTextDesc
  to use the equivalent valid iconv descriptor "IBM-1282" 
  instead.
This commit is contained in:
V Narayanan 2009-07-02 13:34:23 +05:30
parent 3c052dd097
commit fdf1461a4f
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,7 @@
drop table if exists t1;
create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i;
insert into t1 values ("test");
select * from t1 order by c;
c
test
drop table t1;

View File

@ -0,0 +1,11 @@
source suite/ibmdb2i/include/have_ibmdb2i.inc;
source suite/ibmdb2i/include/have_i61.inc;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (c char(10), index(c)) charset macce engine=ibmdb2i;
insert into t1 values ("test");
select * from t1 order by c;
drop table t1;

View File

@ -384,6 +384,11 @@ static int32 convertTextDesc(const int32 inType, const int32 outType, const char
strcpy(outDesc,"IBM-1256");
DBUG_RETURN(0);
}
else if (strcmp("macce", inDescOverride) == 0)
{
strcpy(outDesc,"IBM-1282");
DBUG_RETURN(0);
}
}
else if (outType == Qlg_TypeAS400CCSID)
{