~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/delete.test

MergedĀ fromĀ Paul.

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
117
118
select * from t12;
118
119
select * from t2;
119
120
-- error 1242
120
121
delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a);
121
122
select * from t11;
 
123
--sorted_result
122
124
select * from t12;
 
125
# PBXT: for some reason this returns 2 warnings instead of 1
123
126
delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a);
124
127
select * from t11;
 
128
--sorted_result
125
129
select * from t12;
126
130
insert into t11 values (2, 12);
127
131
-- error 1242
167
171
# Bug#17711: DELETE doesn't use index when ORDER BY, LIMIT and
168
172
#            non-restricting WHERE is present.
169
173
#
 
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
170
179
create table t1(f1 int primary key);
171
180
insert into t1 values (4),(3),(1),(2);
172
181
delete from t1 where (@a:= f1) order by f1 limit 1;