title: MariaDB drop partition gives syntax error
body: <p>I try to drop partition in MariaDB database table by this command:</p>
  <pre><code>ALTER TABLE d_tracking DROP PARTITION 20151001;
  </code></pre>
  <p>but gets an error:</p>
  <pre><code>ERROR 1064 (42000): You have an error in your SQL syntax; 
  check the manual that corresponds to your MariaDB server version 
  for the right syntax to use near '20151001' at line 1
  </code></pre>
  <p>The syntax of the command is the same as on official page <a href="https://mariadb.com/kb/en/partition-maintenance/" rel="nofollow noreferrer">https://mariadb.com/kb/en/partition-maintenance/</a></p>
  <p>&quot;SHOW CREATE TABLE d_tracking&quot; shows:</p>
  <pre><code>CREATE TABLE `d_tracking` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `idUser` int(11) NOT NULL,
    `actionTime` datetime NOT NULL,
    `action` varchar(255) NOT NULL,
    PRIMARY KEY (`id`,`actionTime`),
    KEY `idUser` (`idUser`),
    KEY `actionTime` (`actionTime`)
  ) ENGINE=InnoDB AUTO_INCREMENT=28805509 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4
   PARTITION BY RANGE (to_days(`actionTime`))
  (PARTITION `20151001` VALUES LESS THAN (736237) ENGINE = InnoDB,
   PARTITION `20160101` VALUES LESS THAN (736329) ENGINE = InnoDB,
   ...
   PARTITION `od` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
  </code></pre>
  <p>Similar result for the command</p>
  <pre><code> ALTER TABLE d_tracking REORGANIZE PARTITION od INTO 
     ( PARTITION 20220401 VALUES LESS THAN (TO_DAYS('2022-04-01')) 
       ENGINE=InnoDB, PARTITION od VALUES LESS THAN (MAXVALUE) ENGINE=InnoDB );
  </code></pre>
  <p>answer is:</p>
  <pre><code> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual 
     that corresponds to your MariaDB server version for the right syntax to use 
     near '20220401 VALUES LESS THAN (TO_DAYS('2022-04-01')) 
     ENGINE=InnoDB, PARTITION od VA' at line 1
  </code></pre>
  <p>Please help.</p>
  <p>MariaDB server version is 10.2.24, OS Debian GNU/Linux 9.9.</p>