title: Can MySQL create new partitions from the event scheduler
body: <p>I'm having a table looking something like this:</p>
  
  <pre><code>CREATE TABLE `Calls` (
    `calendar_id` int(11) NOT NULL,
    `db_date` timestamp NOT NULL,
    `cgn` varchar(32) DEFAULT NULL,
    `cpn` varchar(32) DEFAULT NULL,
    PRIMARY KEY (`calendar_id`),
    KEY `db_date_idx` (`db_date`)
  ) 
   PARTITION BY RANGE (calendar_id)(
     PARTITION p20091024 VALUES LESS THAN (20091024) ,
     PARTITION p20091025 VALUES LESS THAN (20091025));
  </code></pre>
  
  <p>Can I somehow use the mysql scheduler to automatically add a new partition(2 days in advance) - I'm looking for an example that would, every day add a new partition - it'd run something like</p>
  
  <pre><code>alter table Calls add partition (partition p20091026 values less than(20091026));
  </code></pre>
  
  <p>Where p20091026/20091026 is constructed when the scheduled task run, deriving the value from now + 2 day. (Or am I better of scripting this through cron ?)</p>