title: Adding a partition to already partitioned table
body: <p>Whats the best way to add another partition to an already partitioned table?  </p>
  
  <p>The original <code>CREATE TABLE</code> statement looks like:</p>
  
  <pre><code>CREATE TABLE `command_log` (
    `id` bigint(20) NOT NULL,
    `insert_time` datetime NOT NULL,
    `start_time` timestamp NULL DEFAULT '0000-00-00 00:00:00',
    `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    `command` varchar(255) NOT NULL,
    `parameters` varchar(255) DEFAULT NULL,
    `result` mediumblob,
    `status` int(11) NOT NULL,
    PRIMARY KEY (`id`,`insert_time`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
  /*!50100 PARTITION BY RANGE (to_days(insert_time))
  (PARTITION p001 VALUES LESS THAN (736237) ENGINE = InnoDB,
   PARTITION p002 VALUES LESS THAN (736268) ENGINE = InnoDB,
   PARTITION p003 VALUES LESS THAN (736298) ENGINE = InnoDB,
   ...
   PARTITION p064 VALUES LESS THAN (738156) ENGINE = InnoDB,
   PARTITION p065 VALUES LESS THAN (738187) ENGINE = InnoDB,
   PARTITION p066 VALUES LESS THAN (738215) ENGINE = InnoDB,
   PARTITION p067 VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
  </code></pre>
  
  <p>Let's say I want to add just 1 additional partition, in this case <code>p067</code>.  Does this require a whole <code>ALTER TABLE</code> statement, like:</p>
  
  <pre><code>ALTER TABLE command_log 
  PARTITION by range (to_days(insert_time))
  (
      partition p059 VALUES LESS THAN (to_days('2020-08-01'))
    , partition p060 VALUES LESS THAN (to_days('2020-09-01'))
    , partition p061 VALUES LESS THAN (to_days('2020-10-01'))
    , partition p062 VALUES LESS THAN (to_days('2020-11-01'))
    , partition p063 VALUES LESS THAN (to_days('2020-12-01'))
    , partition p064 VALUES LESS THAN (to_days('2021-01-01'))
    , partition p065 VALUES LESS THAN (to_days('2021-02-01'))
    , partition p066 VALUES LESS THAN (to_days('2021-03-01'))
    , partition p067 VALUES LESS THAN (to_days('2021-04-01'))
    , partition p068 VALUES LESS THAN (MAXVALUE)
  );
  </code></pre>
  
  <p>If this is the case, what exactly happens?</p>
  
  <p>Do my older partitions not included in this statement get dropped (for example p001 - p058)?</p>
  
  <p>Does doing this wipe out any existing data in the table (for instance, data in p059)?</p>
  
  <p>Thanks!</p>