Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
Q2/2026 Server Maintenance
Description
Tool for checking if MariaDB server can execute queries stored in a file or from command line. This is usable when one wants to migrate to MariaDB and one wants to ensure
that MariaDB can parse all queries an application is used. If MariaDB can parse the statements it is very likely that it can also execute it.
For example, if one would like to migrate from MySQL, one could run MySQL for some time with the general log on and then check the log and all stored procedures with the tool to
ensure that MariaDB server can handle all the queries.
Usage:
mariadb-check-syntax files
or
cat files | mariadb-check-syntax
The tool should provide errors for all lines the MariaDB server cannot parse.
The error message should include the file, the line number, the query and the error from the parser.
Note that the tool needs to be closely linked to the MariaDB server from the same distribution to ensure that one is testing the exact syntax the server provides.
Some suggested ways to achieve this:
1) Add an option --check-syntax[=file] to mariadbd that would check the commands in the file or from the stream and write commands it could not parse.
2) Create an utility that links with part of the mariadb server that can do the parsing. Philip Stoev did something similar to create a syntax checker a long time ago.
2) Extract the parser into a separate tool.
1) Is probably easier to do.
Attachments
Issue Links
- relates to
-
MDEV-32745 config upgrade helper tool
-
- In Testing
-
-
MDEV-38857 MySQL to MariaDB automation
-
- Open
-
-
MDEV-38994 External Query Parser Tool
-
- Open
-