diff --git a/mysql-test/suite/ibmdb2i/include/have_i61.inc b/mysql-test/suite/ibmdb2i/include/have_i61.inc new file mode 100644 index 00000000000..84b9a17c1d8 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/include/have_i61.inc @@ -0,0 +1,20 @@ +# Check for IBM i 6.1 or later +--disable_query_log +system uname -rv > $MYSQLTEST_VARDIR/tmp/version; +--disable_warnings +drop table if exists uname_vr; +--enable_warnings +create temporary table uname_vr (r int, v int); +--disable_warnings +eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/version" into table uname_vr fields terminated by ' '; +--enable_warnings +let $ok = `select count(*) from uname_vr where v > 5`; +drop table uname_vr; +remove_file $MYSQLTEST_VARDIR/tmp/version; +--enable_query_log +if (!$ok) +{ + skip "Need IBM i 6.1 or later"; +} + + diff --git a/mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc b/mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc new file mode 100644 index 00000000000..f3ef0b4f1ac --- /dev/null +++ b/mysql-test/suite/ibmdb2i/include/have_ibmdb2i.inc @@ -0,0 +1,6 @@ +if (!`SELECT count(*) FROM information_schema.engines WHERE + (support = 'YES' OR support = 'DEFAULT') AND + engine = 'ibmdb2i'`) +{ + skip Need ibmdb2i engine; +} diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result new file mode 100644 index 00000000000..ddf92db6bca --- /dev/null +++ b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44020.result @@ -0,0 +1,11 @@ +create schema `A12345_@$#`; +create table `A12345_@$#`.t1 (i int) engine=ibmdb2i; +show create table `A12345_@$#`.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL +) ENGINE=IBMDB2I DEFAULT CHARSET=latin1 +select * from `A12345_@$#`.t1; +i +drop table `A12345_@$#`.t1; +drop schema `A12345_@$#`; diff --git a/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result new file mode 100644 index 00000000000..10a3070fcc4 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44025.result @@ -0,0 +1,4 @@ +create table t1 (c char(10) collate utf8_swedish_ci, index(c)) engine=ibmdb2i; +drop table t1; +create table t1 (c char(10) collate ucs2_swedish_ci, index(c)) engine=ibmdb2i; +drop table t1; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test new file mode 100644 index 00000000000..09a7c75cfc0 --- /dev/null +++ b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44020.test @@ -0,0 +1,9 @@ +source suite/ibmdb2i/include/have_ibmdb2i.inc; +source include/have_case_sensitive_file_system.inc; + +create schema `A12345_@$#`; +create table `A12345_@$#`.t1 (i int) engine=ibmdb2i; +show create table `A12345_@$#`.t1; +select * from `A12345_@$#`.t1; +drop table `A12345_@$#`.t1; +drop schema `A12345_@$#`; diff --git a/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test new file mode 100644 index 00000000000..9b033a2298f --- /dev/null +++ b/mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44025.test @@ -0,0 +1,9 @@ +source suite/ibmdb2i/include/have_ibmdb2i.inc; +source suite/ibmdb2i/include/have_i61.inc; + + +create table t1 (c char(10) collate utf8_swedish_ci, index(c)) engine=ibmdb2i; +drop table t1; + +create table t1 (c char(10) collate ucs2_swedish_ci, index(c)) engine=ibmdb2i; +drop table t1;