diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result new file mode 100644 index 00000000000..916e1d93ee5 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45196.result @@ -0,0 +1,33 @@ +drop table if exists t1; +create table t1 (c char(10), index(c)) collate ucs2_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +c +h +ch +i +drop table t1; +create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +c +h +ch +i +drop table t1; +create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +c +abc +abcd +aaaa +drop table t1; +create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +c +abc +abcd +aaaa +drop table t1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test new file mode 100644 index 00000000000..17b1d658975 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45196.test @@ -0,0 +1,26 @@ +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)) collate ucs2_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +drop table t1; + +create table t1 (c char(10), index(c)) collate utf8_czech_ci engine=ibmdb2i; +insert into t1 values ("ch"),("h"),("i"); +select * from t1 order by c; +drop table t1; + +create table t1 (c char(10), index(c)) collate ucs2_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +drop table t1; + +create table t1 (c char(10), index(c)) collate utf8_danish_ci engine=ibmdb2i; +insert into t1 values("abc"),("abcd"),("aaaa"); +select c from t1 order by c; +drop table t1; diff --git a/storage/ibmdb2i/db2i_collationSupport.cc b/storage/ibmdb2i/db2i_collationSupport.cc index a41f211a689..65a17fd2452 100644 --- a/storage/ibmdb2i/db2i_collationSupport.cc +++ b/storage/ibmdb2i/db2i_collationSupport.cc @@ -44,7 +44,7 @@ OF SUCH DAMAGE. between corresponding array slots but is incomplete without case-sensitivity markers dynamically added to the mySqlSortSequence names. */ -#define MAX_COLLATION 89 +#define MAX_COLLATION 87 static const char* mySQLCollation[MAX_COLLATION] = { {"ascii_general"}, @@ -52,7 +52,6 @@ static const char* mySQLCollation[MAX_COLLATION] = {"big5_chinese"}, {"big5"}, {"cp1250_croatian"}, - {"cp1250_czech"}, {"cp1250_general"}, {"cp1250_polish"}, {"cp1250"}, @@ -84,7 +83,6 @@ static const char* mySQLCollation[MAX_COLLATION] = {"latin1_swedish"}, {"latin1"}, {"latin2_croatian"}, - {"latin2_czech"}, {"latin2_general"}, {"latin2_hungarian"}, {"latin2"}, @@ -146,7 +144,6 @@ static const char* mySqlSortSequence[MAX_COLLATION] = {"QACHT04B0"}, {"QBCHT04B0"}, {"QALA20481"}, - {"QBLA20481"}, {"QCLA20481"}, {"QDLA20481"}, {"QELA20481"}, @@ -178,7 +175,6 @@ static const char* mySqlSortSequence[MAX_COLLATION] = {"QELA1047C"}, {"QFLA1047C"}, {"QCLA20366"}, - {"QDLA20366"}, {"QELA20366"}, {"QFLA20366"}, {"QGLA20366"}, @@ -190,8 +186,8 @@ static const char* mySqlSortSequence[MAX_COLLATION] = {"QDJPN04B0"}, {"QATHA0346"}, {"QBTHA0346"}, - {"ACS"}, - {"ADA"}, + {"ACS_CZ"}, + {"ADA_DK"}, {"AEO"}, {"AET"}, {"QAUCS04B0"}, @@ -211,8 +207,8 @@ static const char* mySqlSortSequence[MAX_COLLATION] = {"*HEX"}, {"QEJPN04B0"}, {"QFJPN04B0"}, - {"ACS"}, - {"ADA"}, + {"ACS_CZ"}, + {"ADA_DK"}, {"AEO"}, {"AET"}, {"QAUCS04B0"},