~vkolesnikov/pbxt/pbxt-07-diskfull

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/r/binary.result

  • Committer: paul-mccullagh
  • Date: 2006-10-23 09:14:04 UTC
  • Revision ID: paul-mccullagh-918861e03d351978a9541168a96e58cc826734ee
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1,t2;
 
2
create table t1 (name char(20) not null, primary key (name));
 
3
create table t2 (name char(20) binary not null, primary key (name));
 
4
insert into t1 values ("�");
 
5
insert into t1 values ("�");
 
6
insert into t1 values ("�");
 
7
insert into t2 select * from t1;
 
8
select * from t1 order by name;
 
9
name
 
10
 
11
 
12
 
13
select concat("*",name,"*") from t1 order by 1;
 
14
concat("*",name,"*")
 
15
*�*
 
16
*�*
 
17
*�*
 
18
select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t1;
 
19
min(name)       min(concat("*",name,"*"))       max(name)       max(concat("*",name,"*"))
 
20
�       *�*     �       *�*
 
21
select * from t2 order by name;
 
22
name
 
23
 
24
 
25
 
26
select concat("*",name,"*") from t2 order by 1;
 
27
concat("*",name,"*")
 
28
*�*
 
29
*�*
 
30
*�*
 
31
select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t2;
 
32
min(name)       min(concat("*",name,"*"))       max(name)       max(concat("*",name,"*"))
 
33
�       *�*     �       *�*
 
34
select name from t1 where name between '�' and '�';
 
35
name
 
36
 
37
 
38
select name from t2 where name between '�' and '�';
 
39
name
 
40
 
41
 
42
 
43
select name from t2 where name between '�' and '�';
 
44
name
 
45
drop table t1,t2;
 
46
create table t1 (a char(10) not null, b char(10) binary not null,key (a), key(b));
 
47
insert into t1 values ("hello ","hello "),("hello2 ","hello2 ");
 
48
select concat("-",a,"-",b,"-") from t1 where a="hello";
 
49
concat("-",a,"-",b,"-")
 
50
-hello-hello-
 
51
select concat("-",a,"-",b,"-") from t1 where a="hello ";
 
52
concat("-",a,"-",b,"-")
 
53
-hello-hello-
 
54
select concat("-",a,"-",b,"-") from t1 ignore index (a) where a="hello ";
 
55
concat("-",a,"-",b,"-")
 
56
-hello-hello-
 
57
select concat("-",a,"-",b,"-") from t1 where b="hello";
 
58
concat("-",a,"-",b,"-")
 
59
-hello-hello-
 
60
select concat("-",a,"-",b,"-") from t1 where b="hello ";
 
61
concat("-",a,"-",b,"-")
 
62
-hello-hello-
 
63
select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello ";
 
64
concat("-",a,"-",b,"-")
 
65
-hello-hello-
 
66
alter table t1 modify b tinytext not null, drop key b, add key (b(100));
 
67
select concat("-",a,"-",b,"-") from t1;
 
68
concat("-",a,"-",b,"-")
 
69
-hello-hello-
 
70
-hello2-hello2-
 
71
select concat("-",a,"-",b,"-") from t1 where b="hello ";
 
72
concat("-",a,"-",b,"-")
 
73
-hello-hello-
 
74
select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello ";
 
75
concat("-",a,"-",b,"-")
 
76
-hello-hello-
 
77
drop table t1;
 
78
create table t1 (b char(8));
 
79
insert into t1 values(NULL);
 
80
select b from t1 where binary b like '';
 
81
b
 
82
select b from t1 group by binary b like '';
 
83
b
 
84
NULL
 
85
select b from t1 having binary b like '';
 
86
b
 
87
drop table t1;
 
88
create table t1 (a char(3) binary, b binary(3));
 
89
insert into t1 values ('aaa','bbb'),('AAA','BBB');
 
90
select upper(a),upper(b) from t1;
 
91
upper(a)        upper(b)
 
92
AAA     bbb
 
93
AAA     BBB
 
94
select lower(a),lower(b) from t1;
 
95
lower(a)        lower(b)
 
96
aaa     bbb
 
97
aaa     BBB
 
98
select * from t1 where upper(a)='AAA';
 
99
a       b
 
100
aaa     bbb
 
101
AAA     BBB
 
102
select * from t1 where lower(a)='aaa';
 
103
a       b
 
104
aaa     bbb
 
105
AAA     BBB
 
106
select * from t1 where upper(b)='BBB';
 
107
a       b
 
108
AAA     BBB
 
109
select * from t1 where lower(b)='bbb';
 
110
a       b
 
111
aaa     bbb
 
112
select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1;
 
113
charset(a)      charset(b)      charset(binary 'ccc')
 
114
latin1  binary  binary
 
115
select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1;
 
116
collation(a)    collation(b)    collation(binary 'ccc')
 
117
latin1_bin      binary  binary
 
118
drop table t1;
 
119
create table t1( firstname char(20), lastname char(20));
 
120
insert into t1 values ("john","doe"),("John","Doe");
 
121
select * from t1 where firstname='john' and firstname like binary 'john';
 
122
firstname       lastname
 
123
john    doe
 
124
select * from t1 where firstname='john' and binary 'john' = firstname;
 
125
firstname       lastname
 
126
john    doe
 
127
select * from t1 where firstname='john' and firstname = binary 'john';
 
128
firstname       lastname
 
129
john    doe
 
130
select * from t1 where firstname='John' and firstname like binary 'john';
 
131
firstname       lastname
 
132
john    doe
 
133
select * from t1 where firstname='john' and firstname like binary 'John';
 
134
firstname       lastname
 
135
John    Doe
 
136
drop table t1;
 
137
create table t1 (a binary);
 
138
show create table t1;
 
139
Table   Create Table
 
140
t1      CREATE TABLE `t1` (
 
141
  `a` binary(1) DEFAULT NULL
 
142
) ENGINE=PBXT DEFAULT CHARSET=latin1
 
143
drop table t1;
 
144
create table t1 (col1 binary(4));
 
145
insert into t1 values ('a'),('a ');
 
146
select hex(col1) from t1;
 
147
hex(col1)
 
148
61000000
 
149
61200000
 
150
alter table t1 modify col1 binary(10);
 
151
select hex(col1) from t1;
 
152
hex(col1)
 
153
61000000000000000000
 
154
61200000000000000000
 
155
insert into t1 values ('b'),('b ');
 
156
select hex(col1) from t1;
 
157
hex(col1)
 
158
61000000000000000000
 
159
61200000000000000000
 
160
62000000000000000000
 
161
62200000000000000000
 
162
drop table t1;