title: MySQL alter table partitioning syntax
body: <p>I tried to do table partitioning in MySQL by altering the table with the following code:</p>
  
  <pre><code>ALTER TABLE tt DROP PRIMARY KEY, ADD PRIMARY KEY(id, st);
  ALTER TABLE tt ADD PARTITION BY LIST(st) (
      PARTITION p0 VALUES IN (20,10),
      PARTITION p1 VALUES IN (0,-10)
  );
  </code></pre>
  
  <p>but got the following error:</p>
  
  <blockquote>
    <p>Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE tt ADD PARTITION (PARTITION p0 VALUES IN' at line 2: </p>
  </blockquote>
  
  <p>Can someone please let me what's wrong with the syntax?</p>