5
5
drop table if exists t1,t2;
8
create table t1 (name char(20) not null, primary key (name));
9
create table t2 (name char(20) binary not null, primary key (name));
10
insert into t1 values ("�");
11
insert into t1 values ("�");
12
insert into t1 values ("�");
13
insert into t2 select * from t1;
15
select * from t1 order by name;
16
select concat("*",name,"*") from t1 order by 1;
17
select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t1;
18
select * from t2 order by name;
19
select concat("*",name,"*") from t2 order by 1;
20
select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t2;
21
select name from t1 where name between '�' and '�';
22
select name from t2 where name between '�' and '�';
23
select name from t2 where name between '�' and '�';
8
# Conflicts between � and �. Bug#308841
9
#create table t1 (name char(20) not null, primary key (name));
10
#create table t2 (name char(20) binary not null, primary key (name));
11
#insert into t1 values ("�");
12
#insert into t1 values ("�");
13
#insert into t1 values ("�");
14
#insert into t2 select * from t1;
16
#select * from t1 order by name;
17
#select concat("*",name,"*") from t1 order by 1;
18
#select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t1;
19
#select * from t2 order by name;
20
#select concat("*",name,"*") from t2 order by 1;
21
#select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t2;
22
#select name from t1 where name between '�' and '�';
23
#select name from t2 where name between '�' and '�';
24
#select name from t2 where name between '�' and '�';
28
29
# Test of binary and normal strings
31
create table t1 (a char(10) not null, b char(10) binary not null,key (a), key(b));
32
create table t1 (a char(10) not null, b char(10) not null,key (a), key(b));
32
33
insert into t1 values ("hello ","hello "),("hello2 ","hello2 ");
33
34
select concat("-",a,"-",b,"-") from t1 where a="hello";
34
35
select concat("-",a,"-",b,"-") from t1 where a="hello ";
85
85
# Bug #6552 CHAR column w/o length is legal, BINARY w/o length is not
87
create table t1 (a binary);
87
create table t1 (a char);
88
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
88
89
show create table t1;
92
create table t2 (a varbinary);
96
create table t1 (col1 binary(4));
99
create table t1 (col1 char(4));
97
100
insert into t1 values ('a'),('a ');
98
101
select hex(col1) from t1;
99
alter table t1 modify col1 binary(10);
102
alter table t1 modify col1 char(10);
100
103
select hex(col1) from t1;
101
104
insert into t1 values ('b'),('b ');
102
105
select hex(col1) from t1;