1call mtr.add_suppression("Invalid pattern"); 2CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text) engine=rocksdb charset utf8; 3ALTER TABLE t1 ADD INDEX (value); 4ERROR HY000: Unsupported collation on string indexed column test.t1.value Use binary collation (binary, latin1_bin, utf8_bin). 5DROP TABLE t1; 6CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value)) engine=rocksdb charset utf8; 7ERROR HY000: Unsupported collation on string indexed column test.t1.value Use binary collation (latin1_bin, binary, utf8_bin). 8CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value3(50))) engine=rocksdb charset utf8; 9ERROR HY000: Unsupported collation on string indexed column test.t1.value3 Use binary collation (latin1_bin, binary, utf8_bin). 10SET GLOBAL rocksdb_strict_collation_check=0; 11CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value3(50))) engine=rocksdb charset utf8; 12DROP TABLE t1; 13SET GLOBAL rocksdb_strict_collation_check=1; 14CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value2)) engine=rocksdb charset utf8; 15DROP TABLE t1; 16CREATE TABLE t1 (id varchar(20), value varchar(50), value2 varchar(50), value3 text, primary key (id), index(value, value2)) engine=rocksdb charset latin1 collate latin1_bin; 17ALTER TABLE t1 collate=latin1_general_ci; 18DROP TABLE t1; 19CREATE TABLE t1 (id varchar(20), value varchar(50), value2 varchar(50), value3 text, primary key (id), index(value, value2)) engine=rocksdb charset utf8 collate utf8_bin; 20DROP TABLE t1; 21CREATE TABLE t1 (id varchar(20) collate latin1_bin, value varchar(50) collate utf8_bin, value2 varchar(50) collate latin1_bin, value3 text, primary key (id), index(value, value2)) engine=rocksdb; 22DROP TABLE t1; 23SET GLOBAL rocksdb_strict_collation_exceptions=t1; 24CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 25DROP TABLE t1; 26CREATE TABLE t2 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 27ERROR HY000: Unsupported collation on string indexed column test.t2.value Use binary collation (latin1_bin, binary, utf8_bin). 28SET GLOBAL rocksdb_strict_collation_exceptions="t.*"; 29CREATE TABLE t123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 30DROP TABLE t123; 31CREATE TABLE s123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 32ERROR HY000: Unsupported collation on string indexed column test.s123.value Use binary collation (latin1_bin, binary, utf8_bin). 33SET GLOBAL rocksdb_strict_collation_exceptions=".t.*"; 34CREATE TABLE xt123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 35DROP TABLE xt123; 36CREATE TABLE t123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 37ERROR HY000: Unsupported collation on string indexed column test.t123.value Use binary collation (latin1_bin, binary, utf8_bin). 38SET GLOBAL rocksdb_strict_collation_exceptions="s.*,t.*"; 39CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 40DROP TABLE s1; 41CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 42DROP TABLE t1; 43CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 44ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 45SET GLOBAL rocksdb_strict_collation_exceptions="s.*|t.*"; 46CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 47DROP TABLE s1; 48CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 49DROP TABLE t1; 50CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 51ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 52SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"; 53CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 54DROP TABLE s1; 55CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 56DROP TABLE t1; 57CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 58ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 59SET GLOBAL rocksdb_strict_collation_exceptions="|s.*|t.*"; 60CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 61DROP TABLE s1; 62CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 63DROP TABLE t1; 64CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 65ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 66SET GLOBAL rocksdb_strict_collation_exceptions="s.*,,t.*"; 67CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 68DROP TABLE s1; 69CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 70DROP TABLE t1; 71CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 72ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 73SET GLOBAL rocksdb_strict_collation_exceptions="s.*||t.*"; 74CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 75DROP TABLE s1; 76CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 77DROP TABLE t1; 78CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 79ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 80SET GLOBAL rocksdb_strict_collation_exceptions="s.*,t.*,"; 81CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 82DROP TABLE s1; 83CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 84DROP TABLE t1; 85CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 86ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 87SET GLOBAL rocksdb_strict_collation_exceptions="s.*|t.*|"; 88CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 89DROP TABLE s1; 90CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 91DROP TABLE t1; 92CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 93ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 94SET GLOBAL rocksdb_strict_collation_exceptions="||||,,,,s.*,,|,,||,t.*,,|||,,,"; 95CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 96DROP TABLE s1; 97CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 98DROP TABLE t1; 99CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8; 100ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (latin1_bin, binary, utf8_bin). 101SET GLOBAL rocksdb_strict_collation_exceptions='t1'; 102CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb; 103ALTER TABLE t1 AUTO_INCREMENT=1; 104DROP TABLE t1; 105CREATE TABLE t2 (id INT primary key, value varchar(50), index(value)) engine=rocksdb; 106ERROR HY000: Unsupported collation on string indexed column test.t2.value Use binary collation (latin1_bin, binary, utf8_bin). 107CREATE TABLE t2 (id INT primary key, value varchar(50)) engine=rocksdb; 108ALTER TABLE t2 ADD INDEX(value); 109ERROR HY000: Unsupported collation on string indexed column test.t2.value Use binary collation (latin1_bin, binary, utf8_bin). 110DROP TABLE t2; 111SET GLOBAL rocksdb_strict_collation_exceptions="[a-b"; 112FOUND 1 /Invalid pattern in strict_collation_exceptions: \[a-b/ in mysqld.1.err 113CREATE TABLE a (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8; 114ERROR HY000: Unsupported collation on string indexed column test.a.value Use binary collation (latin1_bin, binary, utf8_bin). 115SET GLOBAL rocksdb_strict_collation_exceptions="[a-b]"; 116CREATE TABLE a (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8; 117CREATE TABLE b (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8; 118CREATE TABLE c (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8; 119ERROR HY000: Unsupported collation on string indexed column test.c.value Use binary collation (latin1_bin, binary, utf8_bin). 120DROP TABLE a, b; 121call mtr.add_suppression("Invalid pattern in strict_collation_exceptions:"); 122SET GLOBAL rocksdb_strict_collation_exceptions="abc\\"; 123FOUND 1 /Invalid pattern in strict_collation_exceptions: abc/ in mysqld.1.err 124CREATE TABLE abc (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8; 125ERROR HY000: Unsupported collation on string indexed column test.abc.value Use binary collation (latin1_bin, binary, utf8_bin). 126SET GLOBAL rocksdb_strict_collation_exceptions="abc"; 127CREATE TABLE abc (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8; 128CREATE TABLE abcd (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8; 129ERROR HY000: Unsupported collation on string indexed column test.abcd.value Use binary collation (latin1_bin, binary, utf8_bin). 130DROP TABLE abc; 131SET GLOBAL rocksdb_strict_collation_exceptions=null; 132SET GLOBAL rocksdb_strict_collation_check=1; 133CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value)) engine=rocksdb charset utf8; 134Warnings: 135Warning 1210 Unsupported collation on string indexed column test.t1.value Use binary collation (binary, latin1_bin, utf8_bin). 136DROP TABLE t1; 137CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text) engine=rocksdb charset utf8; 138ALTER TABLE t1 ADD INDEX (value); 139Warnings: 140Warning 1210 Unsupported collation on string indexed column test.t1.value Use binary collation (binary, latin1_bin, utf8_bin). 141DROP TABLE t1; 142CREATE TABLE t1 (id varchar(20), value varchar(50), value2 varchar(50), value3 text, primary key (id), index(value, value2)) engine=rocksdb charset latin1 collate latin1_bin; 143ALTER TABLE t1 collate=latin1_general_ci; 144DROP TABLE t1; 145