~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/user_var.test

  • Committer: Brian Aker
  • Date: 2010-02-11 22:43:58 UTC
  • Revision ID: brian@gaz-20100211224358-y0gdvnat2ahg4c1e
Disabling support for memcached plugins until we can test for version of
memcached.

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=_latin2'test';
85
 
select charset(@a),collation(@a),coercibility(@a);
86
 
select @a=_latin2'TEST';
87
 
select @a=_latin2'TEST' collate latin2_bin;
 
84
set @a='test';
 
85
select collation(@a),coercibility(@a);
 
86
select @a='TEST';
 
87
select @a='TEST' collate utf8_bin;
88
88
 
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;
 
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;
93
93
 
94
94
#
95
95
# Check the same invoking Item_set_user_var
96
96
#
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;
 
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;
105
104
 
106
105
#
107
106
# Bug #6321 strange error:
122
121
#
123
122
--error 1064
124
123
set session @honk=99;
125
 
--error 1382
126
 
set one_shot @honk=99;
127
124
 
128
125
#
129
126
# Bug #10724  @@local not preserved in column name of select
151
148
 
152
149
set @first_var= NULL;
153
150
create table t1 select @first_var;
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;
 
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
 
160
163
set @first_var= NULL;
161
164
create table t1 select @first_var;
 
165
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
162
166
show create table t1;
163
167
drop table t1;
164
168
set @first_var= concat(NULL);
165
169
create table t1 select @first_var;
 
170
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
166
171
show create table t1;
167
172
drop table t1;
168
173
set @first_var=1;
169
174
set @first_var= cast(NULL as CHAR);
170
175
create table t1 select @first_var;
 
176
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
171
177
show create table t1;
172
178
drop table t1;
173
179
 
174
180
#
175
 
# Bug #7498 User variable SET saves SIGNED BIGINT as UNSIGNED BIGINT
 
181
# Bug #7498 User variable SET saves SIGNED BIGINT as BIGINT
176
182
#
177
183
 
178
184
# First part, set user var to large number and select it
182
188
# Second part, set user var from large number in table
183
189
# then select it
184
190
CREATE TABLE `bigfailure` (
185
 
  `afield` BIGINT UNSIGNED NOT NULL
 
191
  `afield` BIGINT NOT NULL
186
192
);
187
193
INSERT INTO `bigfailure` VALUES (18446744071710965857);
188
194
SELECT * FROM bigfailure;
190
196
select * from bigfailure where afield = (SELECT afield FROM bigfailure);
191
197
select * from bigfailure where afield = 18446744071710965857;
192
198
# This is fixed in 5.0, to be uncommented there
193
 
#select * from bigfailure where afield = '18446744071710965857';
 
199
select * from bigfailure where afield = '18446744071710965857';
194
200
select * from bigfailure where afield = 18446744071710965856+1;
195
201
 
196
202
SET @a := (SELECT afield FROM bigfailure);
210
216
insert into t1 values (1,2),(2,3),(3,1);
211
217
select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
212
218
select @var;
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;
 
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;
217
225
 
218
226
#
219
227
# Bug#19024 - SHOW COUNT(*) WARNINGS not return Errors