← Back to team overview

maria-developers team mailing list archive

Feature request: Add support for a syntax check for SQL scripts



we have a lot of developers writing a lot of SQL scripts against a lot
of different databases. These scripts usually consists of mixed DDL
(e.g. change a column definition) and DML (e.g. adding new master data).
Since our applications are constantly under development we'd like to add
these scripts to our continuous integration environment.
For that it would be great to have a feature that checks the script
against a given database without actually executing it. It should not
only check the SQL syntax but also if all mentioned tables, columns etc.
exists in the given database.
It is not possible to use transactions for that since DDL is (currently)
not transactional.

I'm thinking of something like this:


-- here come the sql statements


I've tried to write such a check with an external tool but as it turned
out this is virtually impossible and has a lot of loopholes.

Do you think it would be possible to implement something like this in
the server?


Follow ups