~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/delete.test

  • Committer: Monty Taylor
  • Date: 2008-10-05 01:41:06 UTC
  • Revision ID: monty@inaugust.com-20081005014106-bulqe4kp7i6ipts1
Moved qsort declarations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
insert into t12 values (33, 10),(0, 11),(2, 12);
115
115
insert into t2 values (1, 21),(2, 12),(3, 23);
116
116
select * from t11;
117
 
--sorted_result
118
117
select * from t12;
119
118
select * from t2;
120
119
-- error 1242
121
120
delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a);
122
121
select * from t11;
123
 
--sorted_result
124
122
select * from t12;
125
 
# PBXT: for some reason this returns 2 warnings instead of 1
126
123
delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a);
127
124
select * from t11;
128
 
--sorted_result
129
125
select * from t12;
130
126
insert into t11 values (2, 12);
131
127
-- error 1242
171
167
# Bug#17711: DELETE doesn't use index when ORDER BY, LIMIT and
172
168
#            non-restricting WHERE is present.
173
169
#
174
 
# PBXT is different here. @a = 2 instead of 1. I think the
175
 
# reason is because an index is not used, as done with
176
 
# InnoDB. This may be due to lack of cluster index. If the
177
 
# delete below is based on a secondary index then the
178
 
# index is not used
179
170
create table t1(f1 int primary key);
180
171
insert into t1 values (4),(3),(1),(2);
181
172
delete from t1 where (@a:= f1) order by f1 limit 1;