81
81
# attributes from values they were initialized to.
85
select collation(@a),coercibility(@a);
87
select @a='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='test' collate utf8_general_ci;
90
select collation(@a),coercibility(@a);
92
select @a='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:='test');
98
select coercibility(@a:='test');
99
select collation(@a:='test' collate utf8_bin);
100
select coercibility(@a:='test' collate utf8_bin);
101
select (@a:='test' collate utf8_bin) = 'TEST';
102
select collation(@a),coercibility(@a);
103
select (@a:='test' collate utf8_bin) = '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:
149
152
set @first_var= NULL;
150
153
create table t1 select @first_var;
151
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
152
show create table t1;
155
# This is not supported by Drizzle
157
set @first_var= cast(NULL as integer);
158
#create table t1 select @first_var;
159
#--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
160
#show create table t1;
154
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;
163
160
set @first_var= NULL;
164
161
create table t1 select @first_var;
165
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
166
162
show create table t1;
168
164
set @first_var= concat(NULL);
169
165
create table t1 select @first_var;
170
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
171
166
show create table t1;
173
168
set @first_var=1;
174
169
set @first_var= cast(NULL as CHAR);
175
170
create table t1 select @first_var;
176
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
177
171
show create table t1;
196
190
select * from bigfailure where afield = (SELECT afield FROM bigfailure);
197
191
select * from bigfailure where afield = 18446744071710965857;
198
192
# This is fixed in 5.0, to be uncommented there
199
select * from bigfailure where afield = '18446744071710965857';
193
#select * from bigfailure where afield = '18446744071710965857';
200
194
select * from bigfailure where afield = 18446744071710965856+1;
202
196
SET @a := (SELECT afield FROM bigfailure);
216
210
insert into t1 values (1,2),(2,3),(3,1);
217
211
select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
219
# Bug 310977, uncomment this test after the bug is fixed
220
#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;
227
219
# Bug#19024 - SHOW COUNT(*) WARNINGS not return Errors