Validating database query results

Or, in other words, it is safe to pass a full test script into sqllogictest running in completion mode.

So the previous test could have been run this way: The long-term vision of the sqllogictest project is to amass a huge collection of prototype scripts.

The -verify command-line option is used to activate validation mode.

Another approach to validation is to run the competion step separately for each database engine and save the output in separate test scripts.

Comments are logically removed from the script by a preprocessor.

For example, to verify that SQLite gets the same answer as My SQL on a particular set of queries, one might execute commands as follows.Each record is separated from its neighbors by one or more blank line.Records are evaluated in order, starting from the beginning of the script and working toward the end.First complete the prototype script using My SQL accessed through ODBC as the reference database engine: The second command will display any discrepencies between the output generated by SQLite and the reference data that was generated by My SQL in the first command.Notice that the default mode of operation for sqllogictest is completion mode.

Search for validating database query results:

validating database query results-35

Then compare the two test scripts using a file comparison utility.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating database query results”