title: Changing MySQL range partition clause
body: <p>I have a table created with range partitioning implemented. The clause is :</p>
  
  <pre><code>    ...partition by range (DAYOFMONTH(day)) 
     (PARTITION p0 VALUES LESS THAN (1),
      PARTITION p1 VALUES LESS THAN (2),
      PARTITION p2 VALUES LESS THAN (3),
      ...
      PARTITION p30 VALUES LESS THAN (31)
      );
  </code></pre>
  
  <p>Now, I wish to change the partitioning condition to </p>
  
  <pre><code>   .... partition by range (DAYOFMONTH(day) mod 31)
  </code></pre>
  
  <p>with the rest of individual partition definitions remaining the same.  Is it possible to do so by any ALTER TABLE command or do I have to remove partitioning first and recreate partitions with the new condition?
  I researched quite a lot about this but all information found was about reorganizing individual partitions.Thank you.</p>