24
24
explain select * from t1 where i=@vv1;
25
25
id select_type table type possible_keys key key_len ref rows Extra
26
1 SIMPLE t1 ref i i 4 const 2
26
1 SIMPLE t1 ref i i 4 const 1
27
27
select @vv1,i,v from t1 where i=@vv1;
36
36
1 SIMPLE t1 index NULL i 4 NULL 3 Using where; Using index
37
37
explain select * from t1 where i=@vv1;
38
38
id select_type table type possible_keys key key_len ref rows Extra
39
1 SIMPLE t1 ref i i 4 const 2
39
1 SIMPLE t1 ref i i 4 const 1
42
42
select @a:=10, @b:=1, @a > @b, @a < @b;
135
135
hello again hello hello again 3 hello again hello again
136
136
hello again hello hello again 3 hello again hello again
139
select collation(@a),coercibility(@a);
140
collation(@a) coercibility(@a)
142
select @a=_utf8'TEST';
145
select @a=_utf8'TEST' collate utf8_bin;
146
@a=_utf8'TEST' collate utf8_bin
148
set @a=_utf8'test' collate utf8_general_ci;
149
select collation(@a),coercibility(@a);
150
collation(@a) coercibility(@a)
152
select @a=_utf8'TEST';
155
select @a=_utf8'TEST' collate utf8_bin;
156
@a=_utf8'TEST' collate utf8_bin
158
select collation(@a:=_utf8'test');
159
collation(@a:=_utf8'test')
161
select coercibility(@a:=_utf8'test');
162
coercibility(@a:=_utf8'test')
164
select collation(@a:=_utf8'test' collate utf8_bin);
165
collation(@a:=_utf8'test' collate utf8_bin)
167
select coercibility(@a:=_utf8'test' collate utf8_bin);
168
coercibility(@a:=_utf8'test' collate utf8_bin)
170
select (@a:=_utf8'test' collate utf8_bin) = _utf8'TEST';
171
(@a:=_utf8'test' collate utf8_bin) = _utf8'TEST'
173
select collation(@a),coercibility(@a);
174
collation(@a) coercibility(@a)
176
select (@a:=_utf8'test' collate utf8_bin) = _utf8'TEST' collate utf8_general_ci;
177
(@a:=_utf8'test' collate utf8_bin) = _utf8'TEST' collate utf8_general_ci
139
180
select FIELD( @var,'1it','Hit') as my_column;
183
select @v, coercibility(@v);
186
set @v1=null, @v2=1, @v3=1.1, @v4=now();
187
select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4);
188
coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4)
142
190
set session @honk=99;
143
191
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 '@honk=99' at line 1
144
192
select @@local.max_allowed_packet;
178
226
show create table t1;
179
227
Table Create Table
180
228
t1 CREATE TABLE `t1` (
182
) ENGINE=DEFAULT COLLATE = utf8_general_ci
184
232
set @first_var= concat(NULL);
185
233
create table t1 select @first_var;
186
234
show create table t1;
187
235
Table Create Table
188
236
t1 CREATE TABLE `t1` (
190
) ENGINE=DEFAULT COLLATE = utf8_general_ci
192
240
set @first_var=1;
193
241
set @first_var= cast(NULL as CHAR);