sqllogictest
Sqllogictest parser and runner.
0.29.1
14M downloads/mo
#2583 most downloaded on crates.io
risinglightdb/sqllogictest-rs
What this package is like to depend on
Last release 6 months ago
14 Feb 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 68 of 70 stable releases
1 version withdrawn
withdrawn after publishing
5 years old
71 releases · first in 2021
3 releases in the last 12 months
see the full history below
Release timeline
71 releases · Dec 2021 to Feb 2026Releases
latest 60 of 71-
0.29.114 Feb 2026Release notes
Open source →[0.29.1] - 2026-02-13
- parser/runner: Add
letrecord for binding query results to variables.
- parser/runner: Add
-
0.29.019 Dec 2025Release notes
Open source →[0.29.0] - 2025-12-19
- parser/runner: Support matching expected failures by SQLSTATE via
statement|query error (<SQLSTATE>).
Release notes
Open source →- parser/runner: Support matching expected failures by SQLSTATE via
statement|query error (<SQLSTATE>).
- parser/runner: Support matching expected failures by SQLSTATE via
-
0.28.407 Sep 2025Release notes
Open source →[0.28.4] - 2025-09-04
- bin: support skip files with regex
- runner: Add
<slt:ignore>to skip the volatile parts of the output.
Release notes
Open source →- bin: support skip files with regex
- runner: Add
<slt:ignore>to skip the volatile parts of the output.
-
0.28.306 Jun 2025Release notes
Open source →[0.28.3] - 2025-05-16
- bin: Add
--shutdown-timeoutto set a timeout for shutting down the database connections after a test file is finished. By default, this is unspecified, meaning to wait forever.
Release notes
Open source →- bin: Add
--shutdown-timeoutto set a timeout for shutting down the database connections after a test file is finished. By default, this is unspecified, meaning to wait forever.
- bin: Add
-
0.28.207 May 2025Release notes
Open source →[0.28.2] - 2025-05-07
- engines: Enhance graceful shutdown by canceling ongoing queries when shutting down postgres connections. This improves the behavior when receiving a
Ctrl-Csignal by ensuring that any long-running queries are properly canceled before the connection is closed. - bin: In parallel mode, the output of a test case will be printed promptly before shutting down the database connection.
Release notes
Open source →- engines: Enhance graceful shutdown by canceling ongoing queries when shutting down postgres connections. This improves the behavior when receiving a
Ctrl-Csignal by ensuring that any long-running queries are properly canceled before the connection is closed. - bin: In parallel mode, the output of a test case will be printed promptly before shutting down the database connection.
- engines: Enhance graceful shutdown by canceling ongoing queries when shutting down postgres connections. This improves the behavior when receiving a
-
0.28.118 Apr 2025Release notes
Open source →[0.28.1] - 2025-04-18
- bin: Support graceful shutdown. When receiving a
Ctrl-C, the program will cancel all running test cases, log cancelled and skipped test cases, drop temporary databases (if in parallel mode), close database connections, and finally exit with a non-zero code.
Release notes
Open source →- bin: Support graceful shutdown. When receiving a
Ctrl-C, the program will cancel all running test cases, log cancelled and skipped test cases, drop temporary databases (if in parallel mode), close database connections, and finally exit with a non-zero code.
- bin: Support graceful shutdown. When receiving a
-
0.28.007 Mar 2025Release notes
Open source →[0.28.0] - 2025-03-06
- runner: Add
PartitionerandRunner::with_partitionerto enable partitioning of test cases, allowing only a subset of the glob result to be executed. This can be helpful for running tests in parallel in CI. - bin: Add
--partition-idand--partition-countto set a hash partitioning for the test cases. If users are running in Buildkite CI withparallelism: ..specified in the workflow file, this will be automatically configured.
Release notes
Open source →- runner: Add
PartitionerandRunner::with_partitionerto enable partitioning of test cases, allowing only a subset of the glob result to be executed. This can be helpful for running tests in parallel in CI. - bin: Add
--partition-idand--partition-countto set a hash partitioning for the test cases. If users are running in Buildkite CI withparallelism: ..specified in the workflow file, this will be automatically configured.
- runner: Add
-
0.27.218 Feb 2025Release notes
Open source →[0.27.2] - 2025-02-18
- engines/bin: fix stdin to be closed properly to avoid hangs in the
externalengine.
Release notes
Open source →- engines/bin: fix stdin to be closed properly to avoid hangs in the
externalengine.
- engines/bin: fix stdin to be closed properly to avoid hangs in the
-
0.27.117 Feb 2025Release notes
Open source →[0.27.1] - 2025-02-17
- runner: Add
Runner::set_varmethod to allow adding runner-local variables for substitution. - bin: Add
__DATABASE__variable for accessing current database name from SLT files.
Release notes
Open source →- runner: Add
Runner::set_varmethod to allow adding runner-local variables for substitution. - bin: Add
__DATABASE__variable for accessing current database name from SLT files.
- runner: Add
-
0.27.011 Feb 2025Release notes
Open source →[0.27.0] - 2025-02-11
- runner: add
shutdownmethod toDBandAsyncDBtrait to allow for graceful shutdown of the database connection. Users are encouraged to callRunner::shutdownorRunner::shutdown_asyncafter running tests to ensure that the database connections are properly closed.
Release notes
Open source →- runner: add
shutdownmethod toDBandAsyncDBtrait to allow for graceful shutdown of the database connection. Users are encouraged to callRunner::shutdownorRunner::shutdown_asyncafter running tests to ensure that the database connections are properly closed.
- runner: add
-
0.26.427 Jan 2025Release notes
Open source →- runner: add random string in path generation to avoid conflict when using
include. - bin: detect connection refused error and exit early to make error message clearer.
- runner: add random string in path generation to avoid conflict when using
-
0.26.314 Jan 2025Release notes
Open source →- bin: when
--fail-fastis enabled, abort all remaining connections before dropping temporary databases.
- bin: when
-
0.26.210 Jan 2025Release notes
Open source →- bin: support
--fail-fast, and add env varsSLT_FAIL_FASTandSLT_KEEP_DB_ON_FAILURE
- bin: support
-
0.26.109 Jan 2025 -
0.26.006 Jan 2025Release notes
Open source →- parser: Add back
labelsupport, which was removed in 0.25.0. - parser/runner: support
[statement|query] error retry(Only support multi-line error message)
- parser: Add back
-
0.25.026 Dec 2024 -
0.24.020 Dec 2024Release notes
Open source →- runner: Added a
Normalizertype for normalizing result values. A new functionwith_normalizer(normalizer: Normalizer)has been added to the Runner to allow for specifying a custom Normalizer. The existing default normalizer is available via therunner::default_normalizer(..)function. - parser: Added a new control mode
resultmodethat controls whether the results are invaluewiseorcolumnwisemode. The default iscolumnwisewhich means results are in columns.valuewisemeans the results are in a single column (sqlite test style). - parser: Added
valuesortsort mode. Thevaluesortmode works like rowsort except that it does not honor row groupings. Each individual result value is sorted on its own.
Breaking change:
- The
Validatortype used in various function in Runner implementation has a new required fieldNormalizerthat is used to normalize result values.
- runner: Added a
-
0.23.113 Dec 2024 -
0.23.017 Nov 2024Release notes
Open source →- Refine the behavior of
update_record_with_output/--override- runner: Previously,
queryreturning 0 rows will becomestatement ok. Now it returnsstatement count 0. - bin: Now
--overridewill not change the type chars ofquery <types>, since in practice it becomes?s which might cause confusion.
- runner: Previously,
- runner:
statement count <n>is incorrectly handled when the result is aquery.
- Refine the behavior of
-
0.22.009 Sep 2024 -
0.21.001 Jul 2024Release notes
Open source →Breaking changes:
- runner:
RecordOutputis now returned byRunner::run(orRunner::run_async). This allows users to access the output of each record, or check whether the record is skipped. - runner(substitution): add a special variable
__NOW__which will be replaced with the current Unix timestamp in nanoseconds. - runner(substitution): for
systemcommands, we do not substitute environment variables any more, because the shell can do that. It's necessary to escape like\\any more.$__TEST_DIR__, and are still supported. - runner(system): change
shtobash.
- runner:
-
0.20.624 Jun 2024Release notes
Open source →- runner: add logs for
systemcommand (with targetsqllogictest::system_command) for ease of debugging.
- runner: add logs for
-
0.20.520 Jun 2024Release notes
Open source →- fix(runner): when running in parallel, the runner will correctly inherit configuration like
sort_modeandlabelsfrom the main runner.
- fix(runner): when running in parallel, the runner will correctly inherit configuration like
-
0.20.406 Jun 2024 -
0.20.306 Jun 2024 -
0.20.222 Apr 2024 -
0.20.117 Apr 2024Release notes
Open source →- bin: When using
-j <jobs>to run tests in parallel, add a random suffix to the temporary databases. This is useful if the test is manually canceled, but you want to rerun it freshly. Note that if the test failed, the database will be dropped. This is existing behavior and unchanged. - bin: replace
env_loggerwithtracing-subscriber. You will be able to see the record being executed withRUST_LOG=debug sqllogictest .... - runner: fix the behavior of background
systemcommands (end with&). In0.20.0, it will block until the process exits. Now we return immediately.system ok sleep 5 &
- bin: When using
-
0.20.011 Apr 2024Release notes
Open source →-
Show stdout, stderr when
systemcommand fails. -
Support matching stdout for
systemsystem ok echo "Hello, world!" ---- Hello, world!Currently, only exact match is supported. Besides, the output cannot contain more than one blank lines in between. The record ends with two consecutive blank lines.
Some minor Breaking changes:
- Add field
stdouttoparser::Record::Systemandrunner::RecordOutput::System, and mark them as#[non_exhaustive]. - Change trait method
AsyncDB::run_command's return type fromstd::process::ExitStatustostd::process::Output.
- Add field
-
-
0.19.104 Jan 2024 -
0.19.014 Nov 2023Release notes
Open source →- parser: refactor
expectfield in sqllogictest parser to make it easier to work with.
- parser: refactor
-
0.18.009 Nov 2023Release notes
Open source →-
Support matching multiline error message under
----for bothstatement errorandquery error.query error SELECT 1/0; ---- db error: ERROR: Failed to execute query Caused by these errors: 1: Failed to evaluate expression: 1/0 2: Division by zeroThe output error message must be the exact match of the expected one to pass the test, except for the leading and trailing whitespaces. Users may use
--overrideto let the runner update the test files with the actual output.Empty lines are allowed in the expected error message. As a result, the message must end with two consecutive empty lines.
Breaking changes in the parser:
- Add new variants to
ParseErrorKind. Mark it as#[non_exhaustive]. - Change the type of
expected_errorfromRegextoExpectedError, which is either a inlineRegexor multilineString.
- Add new variants to
-
-
0.17.201 Nov 2023Release notes
Open source →- fix(runner): fix parallel testing db name duplication. Now we use full file path instead of filename as the temporary
db name in
run_parallel_async.
- fix(runner): fix parallel testing db name duplication. Now we use full file path instead of filename as the temporary
db name in
-
0.17.120 Sep 2023 -
0.17.019 Sep 2023Release notes
Open source →-
Support environment variables substitution for SQL and system commands. For compatibility, this feature is by default disabled, and can be enabled by adding
control substitution onto the test file.control substitution on query TTTT SELECT '$foo' -- short , '${foo}' -- long , '${bar:default}' -- default value , '${bar:$foo-default}' -- recursive default value FROM baz; ---- ...Besides, there's a special variable
$__TEST_DIR__which is the path to a temporary directory specific to the current test case. This can be helpful if you need to manipulate some external resources during the test.control substitution on statement ok COPY (SELECT * FROM foo) TO '$__TEST_DIR__/foo.txt'; system ok echo "foo" > "$__TEST_DIR__/foo.txt"Changes:
- (parser) Breaking change: Add
Control::Substitution. MarkControlas#[non_exhaustive]. - (runner) Breaking change: Remove
enable_testdir. For migration, one should now enable general substitution by thecontrolstatement and use a dollar-prefixed$__TEST_DIR__.
- (parser) Breaking change: Add
-
-
0.16.015 Sep 2023Release notes
Open source →-
Support running external system commands with the syntax below. This is useful for manipulating some external resources during the test.
system ok echo "Hello, world!"The runner will check the exit code of the command, and the output will be ignored. Currently, only
okis supported.Changes:
- (parser) Breaking change: Add
Record::System, and correspondingTestErrorKindandRecordOutput. MarkTestErrorKindandRecordOutputas#[non_exhaustive]. - (runner) Add
run_commandtoAsyncDBtrait. The default implementation will run the command withstd::process::Command::status. Implementors can override this method to utilize an asynchronous runtime such astokio.
- (parser) Breaking change: Add
-
fix(runner): fix database name duplication for parallel tests by using the full path of the test file (instead of the file name) as the database name.
-
-
0.15.321 Aug 2023Release notes
Open source →- fix(bin): fix error context display. To avoid stack backtrace being printed, unset
RUST_BACKTRACEenvironment variable, or use pre-built binaries built with stable toolchain instead.
- fix(bin): fix error context display. To avoid stack backtrace being printed, unset
-
0.15.231 Jul 2023 -
0.15.124 Jul 2023Release notes
Open source →- fix
statement errorunexpectedly passed when result is a successfulquery. Similarly for expectedquery errorbut successfulstatement ok.
- fix
-
0.15.011 Jul 2023Release notes
Open source →- Allow multiple connections to the database in a single test case, which is useful for testing the transaction
behavior. This can be achieved by attaching a
connection foorecord before the query or statement.- (parser) Add
Record::Connection. - (runner) Breaking change: Since the runner may establish multiple connections at runtime,
Runner::newnow takes aimpl MakeConnection, which is usually a closure that returns a try-future of theAsyncDBinstance. - (bin) The connection to the database is now established lazily on the first query or statement.
- (parser) Add
- Allow multiple connections to the database in a single test case, which is useful for testing the transaction
behavior. This can be achieved by attaching a
-
0.14.009 Jun 2023Release notes
Open source →- We enhanced how
skipifandonlyifworks. Previously it checks againstDB::engine_name(), andsqllogictest-bindidn't implement it.- (parser) A minor breaking change: Change the field names of
Condition:: OnlyIf/SkipIf. - (runner) Add
Runner::add_label. Now multiple labels are supported (DB::engine_name()is still included). The condition evaluates to true if any of the provided labels match theskipif/onlyif <label>. - (bin) Add
--labeloption to specify custom labels.
- (parser) A minor breaking change: Change the field names of
- We enhanced how
-
0.13.225 Mar 2023 -
0.13.016 Feb 2023Release notes
Open source →sqllogictest-binnow uses the strict validator to update records (the runner still doesn't check schema).- The query syntax now allows optional columns (
query\nwithout any column arguments).
-
0.12.116 Feb 2023 withdrawnNothing published for this version
-
0.12.009 Feb 2023 -
0.11.209 Feb 2023 -
0.11.115 Jan 2023 -
0.11.014 Jan 2023Release notes
Open source →This release contains some minor fixes.
- fix: use
Vec<Vec<String>>for external engine (JDBC) - fix: Use
lines()instead ofsplit('\n')inparse_inner. So the behavior can be correct on Windows. - fix: parse DML with
returningas a query - A minor breaking change:
update_test_filetakes&mut Runnerinstead of its ownnership.
- fix: use
-
0.10.016 Dec 2022Release notes
Open source →-
Improve the ability to unparse and update the test files. Mainly add
update_record_with_outputandupdate_test_fileto the library.More details:
- Add
impl DisplayforRecord(refactorunparse). - Add
Record::Whitespaceso the whitespace in the original files can be reconstructed duringunparse. - Add tests for unparsing and updating records.
- Refactor and fix the behavior about newlines and
haltfor CLI options--overrideand--format.
- Add
-
Fix:
hash-thresholdshould be compared with the number of values instead of the number of rows. -
Breaking change: The type of
Validatoris changed fromfn(&Vec<String>, &Vec<String>) -> booltofn(&[Vec<String>], &[String]) -> bool. Also added adefault_validator.
Thanks to the contributions of @alamb and @xudong963 .
-
-
0.9.007 Dec 2022Release notes
Open source →- Improve the format and color handling for errors.
- Support
hash-threshold. - Fix
statement count <n>for postgres engines. - Breaking change: use
Vec<Vec<String>>instead ofStringas the query results byDB. This allows the runner to verify the results more precisely.- For
rowsort, runner will only sort actual results now, which means the result in the test cases should be sorted.
- For
- Breaking change:
Hookis removed. - Breaking change:
Recordand parser's behavior are tweaked:- retain
Includerecord when linking its content - keep parsing after
Halt - move
Begin/EndIncludetoInjected
- retain
- Added CLI options
--overrideand--format, which can override the test files with the actual output of the database, or reformat the test files.
-
0.8.023 Nov 2022Release notes
Open source →- Support checking error message using
statement error <regex>andquery error <regex>syntax.- Breaking change:
Record::Statement,Record::QueryandTestErrorKindare changed accordingly.
- Breaking change:
- Support checking error message using
-
0.7.115 Nov 2022 -
0.7.015 Nov 2022Release notes
Open source →- Add support for external driver.
- Support more type in postgres-extended.
- Record file stack in location.
-
0.6.425 Aug 2022 -
0.6.324 Aug 2022 -
0.6.222 Aug 2022Release notes
Open source →- Support load balancing of multiple addr.
- Integrate with libtest-mimic. Add the macro
sqllogictest::harness!. - Improve error handling for parser.
-
0.6.116 Aug 2022 -
0.6.006 Aug 2022Release notes
Open source →- Support postgres extended mode
- Separate sqllogictest runner to sqllogictest-bin
-
0.5.526 Jul 2022Release notes
Open source →- Add timestamp to junit. (#57)
- Add
sleepfunction toAsyncDB. (#61) - Fix panic without junit. (#58)
-
0.5.403 Jul 2022 -
0.5.326 Jun 2022