maria-developers team mailing list archive
Mailing list archive
Re: Feature request: Add support for a syntax check for SQL scripts
Zitat von Stewart Smith <stewart@xxxxxxxxxxxxxxxx>:
On Thu, 13 Oct 2011 23:20:24 +0200, Raphael Vullriede
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.
This (of course) won't always work. ALTER TABLE ADD COLUMN and then
mention that column.
Maybe I was not clear enough here. It should perform all possible
checks that are also done if you try to actually execute the script.
For an ADD COLUMN this check would of course be that the column does
_not_ exists yet.
As an alternative, maybe start up a local server and load data in it to
test the scripts on.
That's another approach we're working on. But for some databases the
check must be done against a live db (that is not easily clonable due
to its size).