mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed multi-table-delete
Optimize fixed length MyISAM rows to use pread/pwrite.
This commit is contained in:
@ -1,21 +1,11 @@
|
||||
id1 t
|
||||
1 3
|
||||
2 2
|
||||
3 1
|
||||
id2 t
|
||||
3 3
|
||||
3 2
|
||||
3 1
|
||||
2 3
|
||||
2 2
|
||||
2 1
|
||||
1 3
|
||||
1 2
|
||||
1 1
|
||||
id3 t
|
||||
3 3
|
||||
3 2
|
||||
3 1
|
||||
2 3
|
||||
2 2
|
||||
2 1
|
||||
|
@ -16,10 +16,11 @@ while ($1)
|
||||
dec $1;
|
||||
}
|
||||
|
||||
delete t1.*,t2.* from t1,t2 where t1.id1 = t2.id2 and t1.id1 = 3;
|
||||
delete t3 from t3 left join t1 on (id1=id3) where t1.id1 is null;
|
||||
delete t2 from t1,t2,t3 where id1=id2 and id2=id3 and id1=2;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
select * from t3;
|
||||
|
||||
delete from t1,t2 where t1.id = t2.id and t1.id = 3;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
delete t1,t2 from t1,t2 where 1;
|
||||
drop table t1,t2,t3;
|
||||
|
Reference in New Issue
Block a user