Commit fdf1461a authored by V Narayanan's avatar V Narayanan

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.
parent 3c052dd0
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;
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;
...@@ -384,6 +384,11 @@ static int32 convertTextDesc(const int32 inType, const int32 outType, const char ...@@ -384,6 +384,11 @@ static int32 convertTextDesc(const int32 inType, const int32 outType, const char
strcpy(outDesc,"IBM-1256"); strcpy(outDesc,"IBM-1256");
DBUG_RETURN(0); DBUG_RETURN(0);
} }
else if (strcmp("macce", inDescOverride) == 0)
{
strcpy(outDesc,"IBM-1282");
DBUG_RETURN(0);
}
} }
else if (outType == Qlg_TypeAS400CCSID) else if (outType == Qlg_TypeAS400CCSID)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment