77SQLsmith is a random SQL query generator. Its paragon is [[https://embed.cs.utah.edu/csmith/][Csmith]],
88which proved valuable for quality assurance in C compilers.
99
10- It currently supports generating queries for PostgreSQL 9.1 or later
11- and SQLite 3 . To add support for another RDBMS, you need to implement
12- two classes providing schema information about and connectivity to the
10+ It currently supports generating queries for PostgreSQL, SQLite 3 and
11+ MonetDB . To add support for another RDBMS, you need to implement two
12+ classes providing schema information about and connectivity to the
1313device under test.
1414
1515Besides developers of the RDBMS products, users developing extensions
@@ -18,8 +18,8 @@ workload.
1818
1919During its prototyping stage, it already found about thirty bugs in
2020PostgreSQL alphas, betas and releases, including security
21- vulnerabilities in released versions. SQLsmith's score list is
22- maintained by its users in a wiki:
21+ vulnerabilities in released versions. SQLsmith's growing score list
22+ is maintained by its users in a wiki:
2323
2424 https://github.com/anse1/sqlsmith/wiki#score-list
2525
@@ -30,6 +30,7 @@ maintained by its users in a wiki:
3030optional:
3131- boost::regex in case your std::regex is broken
3232- SQLite3
33+ - monetdb_mapi
3334
3435** Building on Debian Jessie
3536
@@ -64,17 +65,21 @@ Example invocations:
6465: sqlsmith --verbose --target="host=/tmp port=65432 dbname=regression"
6566: # testing SQLite
6667: sqlsmith --verbose --sqlite="file:$HOME/.mozilla/firefox/places.sqlite?mode=ro"
68+ : # testing MonetDB
69+ : sqlsmith --verbose --monetdb="mapi:monetdb://localhost:50000/smith"
6770
6871The following options are currently supported:
6972
7073| =--target=connstr= | target postgres database (default: libpq defaults) |
7174| =--sqlite=URI= | target SQLite3 database |
75+ | =--monetdb=URI= | target MonetDB database |
7276| =--log-to=connstr= | postgres db for logging errors into (default: don't log) |
7377| =--verbose= | emit progress output |
7478| =--version= | show version information |
7579| =--seed=int= | seed RNG with specified integer instead of PID |
7680| =--dry-run= | print queries instead of executing them |
7781| =--max-queries=long= | terminate after generating this many queries |
82+ | =--exclude-catalog= | don't generate queries using catalog relations |
7883| =--dump-all-graphs= | dump generated ASTs for debugging |
7984| =--rng-state=string= | deserialize dumped rng state |
8085
@@ -147,13 +152,14 @@ debugging with the help of SQLsmith might look like.
147152** Large-scale testing
148153
149154=--log-to= allows logging of hundreds of sqlsmith instances into a
150- central database. [[./log.sql]] contains the schema sqlsmith expects and
151- some additional views to generate reports on the logged contents.
155+ central PostgreSQL database. [[./log.sql]] contains the schema sqlsmith
156+ expects and some additional views to generate reports on the logged
157+ contents.
152158
153159It also contains a trigger to filter boring/known errors based on the
154160contents of the tables known and known_re. I periodically COPY my
155- filter tables into the files [[./known_re.txt]] and [[./known.txt]] to serve
156- as a starting point.
161+ filter tables for testing PostgreSQL into the files [[./known_re.txt]] and
162+ [[./known.txt]] to serve as a starting point.
157163
158164** Resources
159165
@@ -169,4 +175,8 @@ and break things). See the file [[COPYING]] for details.
169175
170176Andreas Seltenreich <
[email protected] >
171177
178+ 179+
180+ Stefan Manegold <
[email protected] >
181+
172182[[ast.png]]
0 commit comments