Hey list, 

I noticed a table that was trying to fill the disk before the weekend, so I 
quickly set up an event to gradually clean it out. Yesterday, however, I 
returned to find 400+ jobs in state "updating". I disabled the event, but the 
jobs hadn't cleared up today, so I had to kill them. 

I noticed, however, that the LIMIT statement I specified in the event wasn't 
present in the actual queries... Could that be a parser bug, or does the limit 
simply not show up in the process lists? Has anyone seen this before ? 

This is 5.5.30-1.1-log on Debian 64-bit. 

Thanks, 
Johan 


mysql> show create event jdmsyslogcleaner\G 
*************************** 1. row *************************** 
Event: jdmsyslogcleaner 
sql_mode: 
time_zone: SYSTEM 
Create Event: CREATE DEFINER=`root`@`localhost` EVENT `jdmsyslogcleaner` ON 
SCHEDULE EVERY 30 SECOND STARTS '2014-09-19 19:14:21' ON COMPLETION PRESERVE 
DISABLE COMMENT 'Cleanup to not kill the disk' DO delete from syslog where 
logtime < "2014-07-20" limit 10000 
character_set_client: latin1 
collation_connection: latin1_swedish_ci 
Database Collation: latin1_swedish_ci 
1 row in set (0.00 sec) 


mysql> select * from information_schema.processlist WHERE `INFO` LIKE 'DELETE 
FROM `cacti%' order by time; 
+-----------+-----------+------------+-----------+---------+-------+----------+------------------------------------------------------------------------+
 
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO | 
+-----------+-----------+------------+-----------+---------+-------+----------+------------------------------------------------------------------------+
 
| 149192515 | cacti_net | host:49225 | cacti_net | Query | 21 | init | DELETE 
FROM `cacti_net`.`syslog` WHERE logtime < '2014-06-24 08:48:28' | 
[...] 
| 148845878 | cacti_net | host:50186 | cacti_net | Query | 47345 | updating | 
DELETE FROM `cacti_net`.`syslog` WHERE logtime < '2014-06-23 17:13:51' | 
+-----------+-----------+------------+-----------+---------+-------+----------+------------------------------------------------------------------------+
 
411 rows in set (13.66 sec) 




-- 
What's tiny and yellow and very, very dangerous? 
A canary with the root password. 

Reply via email to