~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_like.result

  • Committer: Brian Aker
  • Date: 2008-09-04 19:31:00 UTC
  • Revision ID: brian@tangent.org-20080904193100-l849hgghfy4urj43
Changing default character set from this point on.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
4
4
explain extended select * from t1 where a like 'abc%';
5
5
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
6
 
1       SIMPLE  t1      index   a       a       43      NULL    5       40.00   Using where; Using index
 
6
1       SIMPLE  t1      index   a       a       13      NULL    5       40.00   Using where; Using index
7
7
Warnings:
8
8
Note    1003    select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` like 'abc%')
9
9
explain extended select * from t1 where a like concat('abc','%');
10
10
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
11
 
1       SIMPLE  t1      index   a       a       43      NULL    5       40.00   Using where; Using index
 
11
1       SIMPLE  t1      index   a       a       13      NULL    5       40.00   Using where; Using index
12
12
Warnings:
13
13
Note    1003    select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` like concat('abc','%'))
14
14
select * from t1 where a like "abc%";
56
56
a
57
57
2004-03-11 12:00:21
58
58
drop table t1;
 
59
SET NAMES koi8r;
 
60
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET koi8r);
 
61
INSERT INTO t1 VALUES ('����'),('����'),('����'),('����'),('����'),('����');
 
62
INSERT INTO t1 VALUES ('����������'),('����������'),('����������'),('����������');
 
63
INSERT INTO t1 VALUES ('����������'),('����������'),('����������'),('����������');
 
64
INSERT INTO t1 VALUES ('����������'),('����������'),('����������'),('����������');
 
65
SELECT * FROM t1 WHERE a LIKE '%����%';
 
66
a
 
67
����
 
68
����
 
69
����
 
70
����
 
71
����
 
72
����
 
73
����������
 
74
����������
 
75
����������
 
76
����������
 
77
����������
 
78
����������
 
79
����������
 
80
����������
 
81
����������
 
82
����������
 
83
����������
 
84
����������
 
85
SELECT * FROM t1 WHERE a LIKE '%���%';
 
86
a
 
87
����
 
88
����
 
89
����
 
90
����
 
91
����
 
92
����
 
93
����������
 
94
����������
 
95
����������
 
96
����������
 
97
����������
 
98
����������
 
99
����������
 
100
����������
 
101
����������
 
102
����������
 
103
����������
 
104
����������
 
105
SELECT * FROM t1 WHERE a LIKE '����%';
 
106
a
 
107
����
 
108
����
 
109
����
 
110
����
 
111
����
 
112
����
 
113
����������
 
114
����������
 
115
����������
 
116
����������
 
117
����������
 
118
����������
 
119
����������
 
120
����������
 
121
����������
 
122
����������
 
123
����������
 
124
����������
 
125
DROP TABLE t1;
 
126
SET NAMES cp1250;
 
127
CREATE TABLE t1 (a varchar(250) NOT NULL) DEFAULT CHARACTER SET=cp1250;
 
128
INSERT INTO t1 VALUES
 
129
('Techni Tapes Sp. z o.o.'),
 
130
('Pojazdy Szynowe PESA Bydgoszcz SA Holding'),
 
131
('AKAPESTER 1 P.P.H.U.'),
 
132
('Pojazdy Szynowe PESA Bydgoszcz S A Holding'),
 
133
('PPUH PESKA-I Maria Struniarska');
 
134
select * from t1 where a like '%PESA%';
 
135
a
 
136
Pojazdy Szynowe PESA Bydgoszcz SA Holding
 
137
Pojazdy Szynowe PESA Bydgoszcz S A Holding
 
138
select * from t1 where a like '%PESA %';
 
139
a
 
140
Pojazdy Szynowe PESA Bydgoszcz SA Holding
 
141
Pojazdy Szynowe PESA Bydgoszcz S A Holding
 
142
select * from t1 where a like '%PES%';
 
143
a
 
144
Techni Tapes Sp. z o.o.
 
145
Pojazdy Szynowe PESA Bydgoszcz SA Holding
 
146
AKAPESTER 1 P.P.H.U.
 
147
Pojazdy Szynowe PESA Bydgoszcz S A Holding
 
148
PPUH PESKA-I Maria Struniarska
 
149
select * from t1 where a like '%PESKA%';
 
150
a
 
151
PPUH PESKA-I Maria Struniarska
 
152
select * from t1 where a like '%ESKA%';
 
153
a
 
154
PPUH PESKA-I Maria Struniarska
 
155
DROP TABLE t1;
 
156
select _cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin;
 
157
_cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin
 
158
1
 
159
set names koi8r;
 
160
select 'andre%' like 'andre�%' escape '�';
 
161
'andre%' like 'andre�%' escape '�'
 
162
1
 
163
select _cp1251'andre%' like convert('andre�%' using cp1251)  escape '�';
 
164
_cp1251'andre%' like convert('andre�%' using cp1251)  escape '�'
 
165
1