mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#4594 "column index make = failed for gbk, but like works"
Fix for MyISAM. Tests for MyISAM and HASH+BTREE.
This commit is contained in:
@ -540,3 +540,23 @@ select c as c_a from t1 where c='б';
|
||||
c_a
|
||||
б
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
str varchar(255) character set utf8 not null,
|
||||
key str (str(2))
|
||||
) engine=myisam;
|
||||
INSERT INTO t1 VALUES ('str');
|
||||
INSERT INTO t1 VALUES ('str2');
|
||||
select * from t1 where str='str';
|
||||
str
|
||||
str
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
str varchar(255) character set utf8 not null,
|
||||
key str using btree (str(2))
|
||||
) engine=heap;
|
||||
INSERT INTO t1 VALUES ('str');
|
||||
INSERT INTO t1 VALUES ('str2');
|
||||
select * from t1 where str='str';
|
||||
str
|
||||
str
|
||||
drop table t1;
|
||||
|
@ -392,3 +392,28 @@ select c as c_all from t1 order by c;
|
||||
select c as c_a from t1 where c='a';
|
||||
select c as c_a from t1 where c='б';
|
||||
drop table t1;
|
||||
|
||||
|
||||
# Bug#4594: column index make = failed for gbk, but like works
|
||||
# Check MYISAM
|
||||
#
|
||||
create table t1 (
|
||||
str varchar(255) character set utf8 not null,
|
||||
key str (str(2))
|
||||
) engine=myisam;
|
||||
INSERT INTO t1 VALUES ('str');
|
||||
INSERT INTO t1 VALUES ('str2');
|
||||
select * from t1 where str='str';
|
||||
drop table t1;
|
||||
|
||||
# the same for HEAP+BTREE
|
||||
#
|
||||
|
||||
create table t1 (
|
||||
str varchar(255) character set utf8 not null,
|
||||
key str using btree (str(2))
|
||||
) engine=heap;
|
||||
INSERT INTO t1 VALUES ('str');
|
||||
INSERT INTO t1 VALUES ('str2');
|
||||
select * from t1 where str='str';
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user