~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/user_var.test

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
# attributes from values they were initialized to.
82
82
#
83
83
 
84
 
set @a='test';
85
 
select collation(@a),coercibility(@a);
86
 
select @a='TEST';
87
 
select @a='TEST' collate utf8_bin;
 
84
set @a=_latin2'test';
 
85
select charset(@a),collation(@a),coercibility(@a);
 
86
select @a=_latin2'TEST';
 
87
select @a=_latin2'TEST' collate latin2_bin;
88
88
 
89
 
set @a='test' collate utf8_general_ci;
90
 
select collation(@a),coercibility(@a);
91
 
select @a='TEST';
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;
93
93
 
94
94
#
95
95
# Check the same invoking Item_set_user_var
96
96
#
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;
104
105
 
105
106
#
106
107
# Bug #6321 strange error:
121
122
#
122
123
--error 1064
123
124
set session @honk=99;
 
125
--error 1382
 
126
set one_shot @honk=99;
124
127
 
125
128
#
126
129
# Bug #10724  @@local not preserved in column name of select
148
151
 
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;
153
 
drop table t1;
154
 
 
155
 
# This is not supported by Drizzle
156
 
--error 1064
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;
161
 
#drop table t1;
162
 
 
 
154
show create table t1;
 
155
drop table t1;
 
156
set @first_var= cast(NULL as signed integer);
 
157
create table t1 select @first_var;
 
158
show create table t1;
 
159
drop 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;
167
163
drop 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;
172
167
drop 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;
178
172
drop table t1;
179
173
 
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;
201
195
 
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;
218
212
select @var;
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;
221
 
#select * from t2;
222
 
#select @var;
223
 
drop table t1;
224
 
#drop table t2;
 
213
create table t2 as select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
 
214
select * from t2;
 
215
select @var;
 
216
drop table t1,t2;
225
217
 
226
218
#
227
219
# Bug#19024 - SHOW COUNT(*) WARNINGS not return Errors