SET max_error_count=0;
DROP TEMPORARY TABLE IF EXISTS tmpfilter;
CREATE TEMPORARY TABLE tmpfilter (gid INT);
INSERT INTO tmpfilter (SELECT cot_cof_gid FROM task WHERE cot_betreff LIKE '+++ DEMO +++ %');
DELETE FROM files WHERE cof_gid IN (SELECT gid FROM tmpfilter);
OPTIMIZE TABLE files; |
set max_error_count=0;
drop temporary table if exists tmpfilter;
create temporary table tmpfilter (gid int);
insert into tmpfilter (select cot_cof_gid from task where cot_betreff like '+++ DEMO +++ %');
delete from files where cof_gid in (select gid from tmpfilter);
optimize table files;