~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/r/ctype_latin1_de.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
Import upstream version 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set names latin1;
 
2
set @@collation_connection=latin1_german2_ci;
 
3
select @@collation_connection;
 
4
@@collation_connection
 
5
latin1_german2_ci
 
6
drop table if exists t1;
 
7
create table t1 (a char (20) not null, b int not null auto_increment, index (a,b));
 
8
insert into t1 (a) values ('�'),('ac'),('ae'),('ad'),('�c'),('aeb');
 
9
insert into t1 (a) values ('�c'),('uc'),('ue'),('ud'),('�'),('ueb'),('uf');
 
10
insert into t1 (a) values ('�'),('oc'),('�a'),('oe'),('od'),('�c'),('oeb');
 
11
insert into t1 (a) values ('s'),('ss'),('�'),('�b'),('ssa'),('ssc'),('�a');
 
12
insert into t1 (a) values ('e�'),('u�'),('�o'),('��'),('��a'),('aeae');
 
13
insert into t1 (a) values ('q'),('a'),('u'),('o'),('�'),('�'),('a');
 
14
select a,b from t1 order by a,b;
 
15
a       b
 
16
a       1
 
17
a       2
 
18
ac      1
 
19
ad      1
 
20
�       1
 
21
ae      2
 
22
��      1
 
23
aeae    2
 
24
��a     1
 
25
aeb     1
 
26
�c      1
 
27
�       1
 
28
�       2
 
29
e�      1
 
30
o       1
 
31
oc      1
 
32
od      1
 
33
�       1
 
34
oe      2
 
35
�a      1
 
36
oeb     1
 
37
�c      1
 
38
�o      1
 
39
q       1
 
40
s       1
 
41
ss      1
 
42
�       2
 
43
ssa     1
 
44
�a      2
 
45
�b      1
 
46
ssc     1
 
47
u       1
 
48
uc      1
 
49
ud      1
 
50
ue      1
 
51
�       2
 
52
ueb     1
 
53
�c      1
 
54
uf      1
 
55
u�      1
 
56
select a,b from t1 order by upper(a),b;
 
57
a       b
 
58
a       1
 
59
a       2
 
60
ac      1
 
61
ad      1
 
62
�       1
 
63
ae      2
 
64
��      1
 
65
aeae    2
 
66
��a     1
 
67
aeb     1
 
68
�c      1
 
69
�       1
 
70
�       2
 
71
e�      1
 
72
o       1
 
73
oc      1
 
74
od      1
 
75
�       1
 
76
oe      2
 
77
�a      1
 
78
oeb     1
 
79
�c      1
 
80
�o      1
 
81
q       1
 
82
s       1
 
83
ss      1
 
84
�       2
 
85
ssa     1
 
86
�a      2
 
87
�b      1
 
88
ssc     1
 
89
u       1
 
90
uc      1
 
91
ud      1
 
92
ue      1
 
93
�       2
 
94
ueb     1
 
95
�c      1
 
96
uf      1
 
97
u�      1
 
98
select a from t1 order by a desc;
 
99
a
 
100
u�
 
101
uf
 
102
�c
 
103
ueb
 
104
 
105
ue
 
106
ud
 
107
uc
 
108
u
 
109
ssc
 
110
�b
 
111
�a
 
112
ssa
 
113
 
114
ss
 
115
s
 
116
q
 
117
�o
 
118
�c
 
119
oeb
 
120
�a
 
121
oe
 
122
 
123
od
 
124
oc
 
125
o
 
126
e�
 
127
 
128
 
129
�c
 
130
aeb
 
131
��a
 
132
aeae
 
133
��
 
134
ae
 
135
 
136
ad
 
137
ac
 
138
a
 
139
a
 
140
check table t1;
 
141
Table   Op      Msg_type        Msg_text
 
142
test.t1 check   status  OK
 
143
select * from t1 where a like "�%";
 
144
a       b
 
145
�       1
 
146
�a      1
 
147
�c      1
 
148
�o      1
 
149
select * from t1 where a like binary "%�%";
 
150
a       b
 
151
�       2
 
152
select * from t1 where a like "%�%";
 
153
a       b
 
154
a       1
 
155
a       2
 
156
ac      1
 
157
ad      1
 
158
ae      2
 
159
aeae    2
 
160
��a     1
 
161
aeb     1
 
162
�a      1
 
163
ssa     1
 
164
�a      2
 
165
select * from t1 where a like "%U%";
 
166
a       b
 
167
u       1
 
168
uc      1
 
169
ud      1
 
170
ue      1
 
171
ueb     1
 
172
uf      1
 
173
u�      1
 
174
select * from t1 where a like "%ss%";
 
175
a       b
 
176
ss      1
 
177
ssa     1
 
178
ssc     1
 
179
drop table t1;
 
180
select strcmp('�','ae'),strcmp('ae','�'),strcmp('aeq','�q'),strcmp('�q','aeq');
 
181
strcmp('�','ae')        strcmp('ae','�')        strcmp('aeq','�q')      strcmp('�q','aeq')
 
182
0       0       0       0
 
183
select strcmp('ss','�'),strcmp('�','ss'),strcmp('�s','sss'),strcmp('�q','ssq');
 
184
strcmp('ss','�')        strcmp('�','ss')        strcmp('�s','sss')      strcmp('�q','ssq')
 
185
0       0       0       0
 
186
select strcmp('�','af'),strcmp('a','�'),strcmp('��','aeq'),strcmp('��','aeaeq');
 
187
strcmp('�','af')        strcmp('a','�') strcmp('��','aeq')      strcmp('��','aeaeq')
 
188
-1      -1      -1      -1
 
189
select strcmp('ss','�a'),strcmp('�','ssa'),strcmp('s�a','sssb'),strcmp('s','�');
 
190
strcmp('ss','�a')       strcmp('�','ssa')       strcmp('s�a','sssb')    strcmp('s','�')
 
191
-1      -1      -1      -1
 
192
select strcmp('�','o�'),strcmp('�','u�'),strcmp('�','oeb');
 
193
strcmp('�','o�')        strcmp('�','u�')        strcmp('�','oeb')
 
194
-1      -1      -1
 
195
select strcmp('af','�'),strcmp('�','a'),strcmp('aeq','��'),strcmp('aeaeq','��');
 
196
strcmp('af','�')        strcmp('�','a') strcmp('aeq','��')      strcmp('aeaeq','��')
 
197
1       1       1       1
 
198
select strcmp('�a','ss'),strcmp('ssa','�'),strcmp('sssb','s�a'),strcmp('�','s');
 
199
strcmp('�a','ss')       strcmp('ssa','�')       strcmp('sssb','s�a')    strcmp('�','s')
 
200
1       1       1       1
 
201
select strcmp('u','�a'),strcmp('u','�');
 
202
strcmp('u','�a')        strcmp('u','�')
 
203
1       1
 
204
select strcmp('s�', '�a'), strcmp('a�', '�x');
 
205
strcmp('s�', '�a')      strcmp('a�', '�x')
 
206
-1      -1
 
207
create table t1 (a varchar(10), key(a), fulltext (a));
 
208
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
 
209
select * from t1 where a like "abc%";
 
210
a
 
211
abc
 
212
abcd
 
213
select * from t1 where a like "test%";
 
214
a
 
215
test
 
216
select * from t1 where a like "te_t";
 
217
a
 
218
test
 
219
select * from t1 where match a against ("te*" in boolean mode)+0;
 
220
a
 
221
test
 
222
drop table t1;
 
223
create table t1 (word varchar(255) not null, word2 varchar(255) not null default '', index(word));
 
224
show create table t1;
 
225
Table   Create Table
 
226
t1      CREATE TABLE `t1` (
 
227
  `word` varchar(255) COLLATE latin1_german2_ci NOT NULL,
 
228
  `word2` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
 
229
  KEY `word` (`word`)
 
230
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
 
231
insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae');
 
232
update t1 set word2=word;
 
233
select word, word=binary 0xdf as t from t1 having t > 0;
 
234
word    t
 
235
�       1
 
236
select word, word=cast(0xdf AS CHAR) as t from t1 having t > 0;
 
237
word    t
 
238
ss      1
 
239
�       1
 
240
select * from t1 where word=binary 0xDF;
 
241
word    word2
 
242
�       �
 
243
select * from t1 where word=CAST(0xDF as CHAR);
 
244
word    word2
 
245
ss      ss
 
246
�       �
 
247
select * from t1 where word2=binary 0xDF;
 
248
word    word2
 
249
�       �
 
250
select * from t1 where word2=CAST(0xDF as CHAR);
 
251
word    word2
 
252
ss      ss
 
253
�       �
 
254
select * from t1 where word='ae';
 
255
word    word2
 
256
�       �
 
257
ae      ae
 
258
select * from t1 where word= 0xe4 or word=CAST(0xe4 as CHAR);
 
259
word    word2
 
260
�       �
 
261
ae      ae
 
262
select * from t1 where word between binary 0xDF and binary 0xDF;
 
263
word    word2
 
264
�       �
 
265
select * from t1 where word between CAST(0xDF AS CHAR) and CAST(0xDF AS CHAR);
 
266
word    word2
 
267
ss      ss
 
268
�       �
 
269
select * from t1 where word like 'ae';
 
270
word    word2
 
271
ae      ae
 
272
select * from t1 where word like 'AE';
 
273
word    word2
 
274
ae      ae
 
275
select * from t1 where word like binary 0xDF;
 
276
word    word2
 
277
�       �
 
278
select * from t1 where word like CAST(0xDF as CHAR);
 
279
word    word2
 
280
�       �
 
281
drop table t1;
 
282
CREATE TABLE t1 (
 
283
autor varchar(80) NOT NULL default '',
 
284
PRIMARY KEY  (autor)
 
285
);
 
286
INSERT INTO t1 VALUES ('Powell, B.'),('Powell, Bud.'),('Powell, L. H.'),('Power, H.'),
 
287
('Poynter, M. A. L. Lane'),('Poynting, J. H. und J. J. Thomson.'),('Pozzi, S(amuel-Jean).'),
 
288
('Pozzi, Samuel-Jean.'),('Pozzo, A.'),('Pozzoli, Serge.');
 
289
SELECT * FROM t1 WHERE autor LIKE 'Poz%' ORDER BY autor;
 
290
autor
 
291
Pozzi, S(amuel-Jean).
 
292
Pozzi, Samuel-Jean.
 
293
Pozzo, A.
 
294
Pozzoli, Serge.
 
295
DROP TABLE t1;
 
296
CREATE TABLE t1 (
 
297
s1 CHAR(5) CHARACTER SET latin1 COLLATE latin1_german2_ci
 
298
);
 
299
show create table t1;
 
300
Table   Create Table
 
301
t1      CREATE TABLE `t1` (
 
302
  `s1` char(5) COLLATE latin1_german2_ci DEFAULT NULL
 
303
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
 
304
INSERT INTO t1 VALUES ('�');
 
305
INSERT INTO t1 VALUES ('ue');
 
306
SELECT DISTINCT s1 FROM t1;
 
307
s1
 
308
 
309
SELECT s1,COUNT(*) FROM t1 GROUP BY s1;
 
310
s1      COUNT(*)
 
311
�       2
 
312
SELECT COUNT(DISTINCT s1) FROM t1;
 
313
COUNT(DISTINCT s1)
 
314
1
 
315
SELECT FIELD('ue',s1), FIELD('�',s1), s1='ue', s1='�' FROM t1;
 
316
FIELD('ue',s1)  FIELD('�',s1)   s1='ue' s1='�'
 
317
1       1       1       1
 
318
1       1       1       1
 
319
DROP TABLE t1;
 
320
create table t1 select repeat('a',4000) a;
 
321
delete from t1;
 
322
insert into t1 values ('a'), ('a '), ('a\t');
 
323
select collation(a),hex(a) from t1 order by a;
 
324
collation(a)    hex(a)
 
325
latin1_german2_ci       6109
 
326
latin1_german2_ci       61
 
327
latin1_german2_ci       6120
 
328
drop table t1;
 
329
drop table if exists t1;
 
330
create table t1 as select repeat(' ', 64) as s1;
 
331
select collation(s1) from t1;
 
332
collation(s1)
 
333
latin1_german2_ci
 
334
delete from t1;
 
335
insert into t1 values ('a'),('ae'),(_latin1 0xE4);
 
336
insert into t1 values ('o'),('oe'),(_latin1 0xF6);
 
337
insert into t1 values ('s'),('ss'),(_latin1 0xDF);
 
338
insert into t1 values ('u'),('ue'),(_latin1 0xFC);
 
339
select s1, hex(s1) from t1 order by s1, binary s1;
 
340
s1      hex(s1)
 
341
a       61
 
342
ae      6165
 
343
�       E4
 
344
o       6F
 
345
oe      6F65
 
346
�       F6
 
347
s       73
 
348
ss      7373
 
349
�       DF
 
350
u       75
 
351
ue      7565
 
352
�       FC
 
353
select group_concat(s1 order by binary s1) from t1 group by s1;
 
354
group_concat(s1 order by binary s1)
 
355
a
 
356
ae,�
 
357
o
 
358
oe,�
 
359
s
 
360
ss,�
 
361
u
 
362
ue,�
 
363
drop table t1;
 
364
SET NAMES latin1;
 
365
CREATE TABLE t1 (
 
366
col1 varchar(255) NOT NULL default ''
 
367
) ENGINE=MyISAM DEFAULT CHARSET=latin1 collate latin1_german2_ci;
 
368
INSERT INTO t1 VALUES ('�'),('ss'),('ss');
 
369
ALTER TABLE t1 ADD KEY ifword(col1);
 
370
SELECT * FROM t1 WHERE col1='�' ORDER BY col1, BINARY col1;
 
371
col1
 
372
ss
 
373
ss
 
374
 
375
DROP TABLE t1;
 
376
create table t1 (s1 char(5) character set latin1 collate latin1_german2_ci);
 
377
insert into t1 values (0xf6) /* this is o-umlaut */;
 
378
select * from t1 where length(s1)=1 and s1='oe';
 
379
s1
 
380
 
381
drop table t1;