81
81
# attributes from values they were initialized to.
85
select collation(@a),coercibility(@a);
86
select @a=_utf8'TEST';
87
select @a=_utf8'TEST' collate utf8_bin;
85
select charset(@a),collation(@a),coercibility(@a);
86
select @a=_latin2'TEST';
87
select @a=_latin2'TEST' collate latin2_bin;
89
set @a=_utf8'test' collate utf8_general_ci;
90
select collation(@a),coercibility(@a);
91
select @a=_utf8'TEST';
92
select @a=_utf8'TEST' collate utf8_bin;
89
set @a=_latin2'test' collate latin2_general_ci;
90
select charset(@a),collation(@a),coercibility(@a);
91
select @a=_latin2'TEST';
92
select @a=_latin2'TEST' collate latin2_bin;
95
95
# Check the same invoking Item_set_user_var
97
select collation(@a:=_utf8'test');
98
select coercibility(@a:=_utf8'test');
99
select collation(@a:=_utf8'test' collate utf8_bin);
100
select coercibility(@a:=_utf8'test' collate utf8_bin);
101
select (@a:=_utf8'test' collate utf8_bin) = _utf8'TEST';
102
select collation(@a),coercibility(@a);
103
select (@a:=_utf8'test' collate utf8_bin) = _utf8'TEST' collate utf8_general_ci;
97
select charset(@a:=_latin2'test');
98
select collation(@a:=_latin2'test');
99
select coercibility(@a:=_latin2'test');
100
select collation(@a:=_latin2'test' collate latin2_bin);
101
select coercibility(@a:=_latin2'test' collate latin2_bin);
102
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST';
103
select charset(@a),collation(@a),coercibility(@a);
104
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci;
106
107
# Bug #6321 strange error:
150
153
create table t1 select @first_var;
151
154
show create table t1;
154
# This is not supported by Drizzle
156
set @first_var= cast(NULL as integer);
157
#create table t1 select @first_var;
158
#show create table t1;
156
set @first_var= cast(NULL as signed integer);
157
create table t1 select @first_var;
158
show create table t1;
161
160
set @first_var= NULL;
162
161
create table t1 select @first_var;
163
162
show create table t1;
191
190
select * from bigfailure where afield = (SELECT afield FROM bigfailure);
192
191
select * from bigfailure where afield = 18446744071710965857;
193
192
# This is fixed in 5.0, to be uncommented there
194
select * from bigfailure where afield = '18446744071710965857';
193
#select * from bigfailure where afield = '18446744071710965857';
195
194
select * from bigfailure where afield = 18446744071710965856+1;
197
196
SET @a := (SELECT afield FROM bigfailure);
211
210
insert into t1 values (1,2),(2,3),(3,1);
212
211
select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
214
# Bug 310977, uncomment this test after the bug is fixed
215
#create table t2 as select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
213
create table t2 as select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
222
219
# Bug#19024 - SHOW COUNT(*) WARNINGS not return Errors