Loading mysql-test/r/heap_btree.result +12 −0 Original line number Diff line number Diff line Loading @@ -280,6 +280,18 @@ a 1 1 drop table t1; CREATE TABLE t1 ( c1 ENUM('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; CREATE TABLE t1 ( c1 SET('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; End of 4.1 tests CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory; INSERT INTO t1 VALUES(0); Loading mysql-test/t/heap_btree.test +17 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,23 @@ delete from t1 where a >= 2; select a from t1 order by a; drop table t1; # # Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE # causes incorrect duplicate entries # CREATE TABLE t1 ( c1 ENUM('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; CREATE TABLE t1 ( c1 SET('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; --echo End of 4.1 tests # Loading storage/heap/ha_heap.cc +4 −1 Original line number Diff line number Diff line Loading @@ -627,6 +627,9 @@ int ha_heap::create(const char *name, TABLE *table_arg, seg->length= (uint) key_part->length; seg->flag= key_part->key_part_flag; if (field->flags & (ENUM_FLAG | SET_FLAG)) seg->charset= &my_charset_bin; else seg->charset= field->charset(); if (field->null_ptr) { Loading Loading
mysql-test/r/heap_btree.result +12 −0 Original line number Diff line number Diff line Loading @@ -280,6 +280,18 @@ a 1 1 drop table t1; CREATE TABLE t1 ( c1 ENUM('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; CREATE TABLE t1 ( c1 SET('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; End of 4.1 tests CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory; INSERT INTO t1 VALUES(0); Loading
mysql-test/t/heap_btree.test +17 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,23 @@ delete from t1 where a >= 2; select a from t1 order by a; drop table t1; # # Bug#24985 - UTF8 ENUM primary key on MEMORY using BTREE # causes incorrect duplicate entries # CREATE TABLE t1 ( c1 ENUM('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; CREATE TABLE t1 ( c1 SET('1', '2'), UNIQUE USING BTREE(c1) ) ENGINE= MEMORY DEFAULT CHARSET= utf8; INSERT INTO t1 VALUES('1'), ('2'); DROP TABLE t1; --echo End of 4.1 tests # Loading
storage/heap/ha_heap.cc +4 −1 Original line number Diff line number Diff line Loading @@ -627,6 +627,9 @@ int ha_heap::create(const char *name, TABLE *table_arg, seg->length= (uint) key_part->length; seg->flag= key_part->key_part_flag; if (field->flags & (ENUM_FLAG | SET_FLAG)) seg->charset= &my_charset_bin; else seg->charset= field->charset(); if (field->null_ptr) { Loading