sqllogictest

command
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

SQLLogicTest Converter and Checker

This package contains a tool to convert SQLLogicTest files from CockroachDB's format to the standard SQLLogicTest format, which is readable and runnable by our SQLLogicTest suite.

Converter Usage

From within the gms/enginetest/sqllogictest directory, run the following command:

go run ./convert/convert.go <infile> <outfile>

CochroachDB's tests use PostgreSQL syntax, while we expect MySQL syntax; the converter does not take this into account. This is where the Checker is useful.

Checker Usage

go run ./check/check.go <infile>

This will run the SQLLogicTests against a running MySQL/Dolt server. You can use the error output to sanity check some of the results, and fix any queries. Common differences are the use of SELECT ... from ... AS a(x) instead of SELECT ... AS x ... from ... AS a, and missing ORDER BY.

It is likely you will have to modify the connection string. Additionally, it is possible to use this on a running dolt sql server.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL