Closed
Description
Describe the bug
According to MySQL Reference Manual - 13.1.8.1 ALTER TABLE Partition Operations,we can use
ALTER TABLE t1 ADD PARTITION (PARTITION p3 VALUES LESS THAN (2002));
ALTER TABLE t1 DROP PARTITION p0, p1;
and so on to change partition.
But when I copy these statements to the SQL console (including the console
in the bottom and SQL
on the top),it reminds me:
1.This option conflicts with "ADD". (near "PARTITION" at position 19)
2.Missing comma before start of a new alter operation. (near "PARTITION" at position 30)
But when I go these statements,it worked(I have create table like the example in the MySQL document).
It seems that the SQL parser in phpMyAdmin doesn't parse these statements properly.
To Reproduce
Steps to reproduce the behavior:
- Create a table in a database like what are in MySQL Document (link is above)
CREATE TABLE t1 (
id INT,
year_col INT
)
PARTITION BY RANGE (year_col) (
PARTITION p0 VALUES LESS THAN (1991),
PARTITION p1 VALUES LESS THAN (1995),
PARTITION p2 VALUES LESS THAN (1999)
);
- Input these statements in console:
ALTER TABLE t1 ADD PARTITION (PARTITION p3 VALUES LESS THAN (2002));
ALTER TABLE t1 DROP PARTITION p0, p1;
- You will find it underlined some words (like "partition").
- Press Ctrl+Enter to excute,and you will find it queried ok.
Expected behavior
phpMyAdmin parse the ALTER TABLE Partition Operations in MySQL Document properly.
Screenshots
Server configuration
- Operating system: Ubuntu Server 20.04
- Web server: Nginx 1.18.0
- Database version: Mariadb 10.3.25
- PHP version: 7.4.3
- phpMyAdmin version: 5.0.4
Client configuration
- Browser: Chrome 81
- Operating system: Windows 7
Thanks.