I finally got around to working with the 5.1 scheduler. I wanted to have a simple but non-trivial example, and when I saw Brian Akers post on the new processlist table, I thought of a useful little application: I would submit an event that would summarize the users and their statuses at regular intervals so I could track user trends.
First off, I needed to enable the scheduler by adding the following line to my configuration file:
event_scheduler=1
Now the scheduler is ready for action. So I created a table to hold my process list details:
CREATE TABLE processhistory (h_timestamp DATETIME,
processcount INTEGER,
…