phpmyadmin / sql-parser

A validating SQL lexer and parser with a focus on MySQL dialect.
https://packagist.org/packages/phpmyadmin/sql-parser
GNU General Public License v2.0
440 stars 102 forks source link

Unrecognized keyword and Unrecognized alter operation #427

Open liviuconcioiu opened 1 year ago

liviuconcioiu commented 1 year ago

CHECK TABLE `table` FOR UPGRADE; will give two errors.

  1. Unrecognized keyword. (near FOR)
  2. Unrecognized keyword. (near UPGRADE)

ALTER TABLE `table` FORCE; will give one error.

  1. Unrecognized alter operation. (near ;)

https://user-images.githubusercontent.com/25424343/222978476-b5959513-be8d-4b49-af58-9b28121505f6.mp4

williamdes commented 1 year ago

I believe the two queries do execute, can you post a documentation link for this sort of query ?

liviuconcioiu commented 1 year ago

I believe the two queries do execute, can you post a documentation link for this sort of query ?

https://mariadb.com/kb/en/check-table/ https://mariadb.com/kb/en/alter-table/

https://dev.mysql.com/doc/refman/8.0/en/check-table.html https://dev.mysql.com/doc/refman/8.0/en/alter-table.html

niconoe- commented 1 month ago

About the CHECK TABLE statement:

About the ALTER TABLE … FORCE statement: