135
135
hello again hello hello again 3 hello again hello again
136
136
hello again hello hello again 3 hello again hello again
138
set @a=_latin2'test';
139
select charset(@a),collation(@a),coercibility(@a);
140
charset(@a) collation(@a) coercibility(@a)
141
latin2 latin2_general_ci 2
142
select @a=_latin2'TEST';
145
select @a=_latin2'TEST' collate latin2_bin;
146
@a=_latin2'TEST' collate latin2_bin
148
set @a=_latin2'test' collate latin2_general_ci;
149
select charset(@a),collation(@a),coercibility(@a);
150
charset(@a) collation(@a) coercibility(@a)
151
latin2 latin2_general_ci 2
152
select @a=_latin2'TEST';
155
select @a=_latin2'TEST' collate latin2_bin;
156
@a=_latin2'TEST' collate latin2_bin
158
select charset(@a:=_latin2'test');
159
charset(@a:=_latin2'test')
161
select collation(@a:=_latin2'test');
162
collation(@a:=_latin2'test')
164
select coercibility(@a:=_latin2'test');
165
coercibility(@a:=_latin2'test')
167
select collation(@a:=_latin2'test' collate latin2_bin);
168
collation(@a:=_latin2'test' collate latin2_bin)
170
select coercibility(@a:=_latin2'test' collate latin2_bin);
171
coercibility(@a:=_latin2'test' collate latin2_bin)
173
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST';
174
(@a:=_latin2'test' collate latin2_bin) = _latin2'TEST'
176
select charset(@a),collation(@a),coercibility(@a);
177
charset(@a) collation(@a) coercibility(@a)
179
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci;
180
(@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci
139
select collation(@a),coercibility(@a);
140
collation(@a) coercibility(@a)
145
select @a='TEST' collate utf8_bin;
146
@a='TEST' collate utf8_bin
148
set @a='test' collate utf8_general_ci;
149
select collation(@a),coercibility(@a);
150
collation(@a) coercibility(@a)
155
select @a='TEST' collate utf8_bin;
156
@a='TEST' collate utf8_bin
158
select collation(@a:='test');
159
collation(@a:='test')
161
select coercibility(@a:='test');
162
coercibility(@a:='test')
164
select collation(@a:='test' collate utf8_bin);
165
collation(@a:='test' collate utf8_bin)
167
select coercibility(@a:='test' collate utf8_bin);
168
coercibility(@a:='test' collate utf8_bin)
170
select (@a:='test' collate utf8_bin) = 'TEST';
171
(@a:='test' collate utf8_bin) = 'TEST'
173
select collation(@a),coercibility(@a);
174
collation(@a) coercibility(@a)
176
select (@a:='test' collate utf8_bin) = 'TEST' collate utf8_general_ci;
177
(@a:='test' collate utf8_bin) = 'TEST' collate utf8_general_ci
183
180
select FIELD( @var,'1it','Hit') as my_column;
221
216
show create table t1;
222
217
Table Create Table
223
218
t1 CREATE TABLE `t1` (
224
`@first_var` longblob
225
) ENGINE=MyISAM DEFAULT CHARSET=latin1
227
set @first_var= cast(NULL as signed integer);
228
create table t1 select @first_var;
229
show create table t1;
231
t1 CREATE TABLE `t1` (
232
`@first_var` bigint(20) DEFAULT NULL
233
) ENGINE=MyISAM DEFAULT CHARSET=latin1
222
set @first_var= cast(NULL as integer);
223
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'integer)' at line 1
235
224
set @first_var= NULL;
236
225
create table t1 select @first_var;
237
226
show create table t1;
238
227
Table Create Table
239
228
t1 CREATE TABLE `t1` (
240
`@first_var` bigint(20) DEFAULT NULL
241
) ENGINE=MyISAM DEFAULT CHARSET=latin1
243
232
set @first_var= concat(NULL);
244
233
create table t1 select @first_var;
245
234
show create table t1;
246
235
Table Create Table
247
236
t1 CREATE TABLE `t1` (
248
`@first_var` longblob
249
) ENGINE=MyISAM DEFAULT CHARSET=latin1
251
240
set @first_var=1;
252
241
set @first_var= cast(NULL as CHAR);
254
243
show create table t1;
255
244
Table Create Table
256
245
t1 CREATE TABLE `t1` (
257
`@first_var` longtext
258
) ENGINE=MyISAM DEFAULT CHARSET=latin1
260
249
set @a=18446744071710965857;
263
252
18446744071710965857
264
253
CREATE TABLE `bigfailure` (
265
`afield` BIGINT UNSIGNED NOT NULL
254
`afield` BIGINT NOT NULL
267
256
INSERT INTO `bigfailure` VALUES (18446744071710965857);
268
257
SELECT * FROM bigfailure;
271
260
select * from (SELECT afield FROM bigfailure) as b;
274
263
select * from bigfailure where afield = (SELECT afield FROM bigfailure);
277
266
select * from bigfailure where afield = 18446744071710965857;
269
select * from bigfailure where afield = '18446744071710965857';
280
271
select * from bigfailure where afield = 18446744071710965856+1;
283
274
SET @a := (SELECT afield FROM bigfailure);
287
278
SET @a := (select afield from (SELECT afield FROM bigfailure) as b);
291
282
SET @a := (select * from bigfailure where afield = (SELECT afield FROM bigfailure));
295
286
drop table bigfailure;
296
287
create table t1(f1 int, f2 int);
297
288
insert into t1 values (1,2),(2,3),(3,1);
298
289
select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
304
create table t2 as select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
312
296
insert into city 'blah';
313
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''blah'' at line 1
297
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near ''blah'' at line 1
314
298
SHOW COUNT(*) WARNINGS;
315
299
@@session.warning_count