~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/update.test

  • Committer: Joe Daly
  • Date: 2010-01-06 02:20:42 UTC
  • mto: This revision was merged to the branch mainline in revision 1267.
  • Revision ID: skinny.moey@gmail.com-20100106022042-8ov23wc4aq8f9k7d
rename hash_algorithm to algorithm

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
# Some strange updates to test some otherwise unused code
15
15
update t1 set a=a+100 where a=1 and a=2;
16
 
--error ER_BAD_FIELD_ERROR
 
16
--error 1054
17
17
update t1 set a=b+100 where a=1 and a=2; 
18
 
--error ER_BAD_FIELD_ERROR
 
18
--error 1054
19
19
update t1 set a=b+100 where c=1 and a=2; 
20
 
--error ER_BAD_FIELD_ERROR
 
20
--error 1054
21
21
update t1 set d=a+100 where a=1;
22
22
select * from t1;
23
23
drop table t1;
152
152
#
153
153
create table t1(f1 int);
154
154
select DATABASE();
155
 
--error ER_INVALID_GROUP_FUNC_USE
 
155
--error 1111
156
156
update t1 set f1=1 where count(*)=1;
157
157
select DATABASE();
158
 
--error ER_INVALID_GROUP_FUNC_USE
 
158
--error 1111
159
159
delete from t1 where count(*)=1;
160
160
drop table t1;
161
161
 
165
165
 
166
166
flush status;
167
167
select a from t1 order by a limit 1;
168
 
--replace_column 2 #
169
168
show status like 'handler_read%';
170
169
 
171
170
flush status;
172
171
update t1 set a=9999 order by a limit 1;
173
172
update t1 set b=9999 order by a limit 1;
174
 
--replace_column 2 #
175
173
show status like 'handler_read%';
176
174
 
177
175
flush status;
178
176
delete from t1 order by a limit 1;
179
 
--replace_column 2 #
180
177
show status like 'handler_read%';
181
178
 
182
179
flush status;
183
180
delete from t1 order by a desc limit 1;
184
 
--replace_column 2 #
185
181
show status like 'handler_read%';
186
182
 
187
183
alter table t1 disable keys;
188
184
 
189
185
flush status;
190
186
delete from t1 order by a limit 1;
191
 
--replace_column 2 #
192
187
show status like 'handler_read%';
193
188
 
194
189
# PBXT: this select returns a different result to
217
212
insert into t2 select A.a + 10*B.a, 'filler','filler' from t1 A, t1 B;
218
213
flush status;
219
214
update t2 set a=3 where a=2;
220
 
--replace_column 2 #
221
215
show status like 'handler_read%';
222
216
drop table t1, t2;
223
217
 
233
227
# Bug#25126: Wrongly resolved field leads to a crash
234
228
#
235
229
create table t1(f1 int);
236
 
--error ER_BAD_FIELD_ERROR
 
230
--error 1054
237
231
update t1 set f2=1 order by f2;
238
232
drop table t1;
239
233
# End of 4.1 tests
263
257
 
264
258
flush status;
265
259
SELECT user_id FROM t1 WHERE request_id=9999999999999; 
266
 
--replace_column 2 #
267
260
show status like '%Handler_read%';
268
261
SELECT user_id FROM t1 WHERE request_id=999999999999999999999999999999; 
269
 
--replace_column 2 #
270
262
show status like '%Handler_read%';
271
263
UPDATE t1 SET user_id=null WHERE request_id=9999999999999;
272
 
--replace_column 2 #
273
264
show status like '%Handler_read%';
274
265
UPDATE t1 SET user_id=null WHERE request_id=999999999999999999999999999999;
275
 
--replace_column 2 #
276
266
show status like '%Handler_read%';
277
267
 
278
268
DROP TABLE t1;
356
346
connection default;
357
347
disconnect con1;
358
348
 
359
 
drop table t1;
360
349
--echo End of 5.0 tests