RE https://github.com/questdb/questdb/issues/595 (sqlancer for QuestDB): I have submitted 1 bug report found by sqlancer (and it is fixed 🎉)
test INSERT into tables, ALTER TABLE (only add or drop index), TRUNCATE TABLE
generate data for types - Numbers (int & float) , BOOLEAN and NULL
test SELECT WHERE with operators(not, basic binary logical operators, binary arithmetic operators, binary comparators)
--- by running current version of sqlancer, it seems to find some logical bugs. I need to investigate a bit to see if they are actual QuestDB bugs and then maybe file bug reports
test more sql keywords (e.g. JOIN), test more datatypes (especially SYMBOL and time series), etc@Andrey Pechkurov
New Bug found:
SELECT t7.c0 FROM t7 WHERE ((t7.c0)>=(t7.c0))
gives empty result set, expecting same result set as
SELECT t7.c0 FROM t7
11/03/2022, 8:55 AM
What's the c0 column type?
11/03/2022, 8:56 AM
CREATE TABLE t7(c0 FLOAT);
it’s float type
11/03/2022, 8:58 AM
I can reproduce this one. Let me create a GH issue. Thanks for finding it!
As for the create table bug, I can send you a snapshot version. How do you run QuestDB?
11/03/2022, 9:28 AM
nvm i deleted the code that triggers the bug. it’s good for now 😄
since it’s fixed, there’s no point to keep that block in sqlancer
PR looks good to me, but just a spoiler, i saw a couple similar error messages, but not sure if they are all from same code block. i’ll compile a list of queries to reproduce them later. (trying to optimize the output format now)
11/03/2022, 10:03 AM
Yeah, I'd expect a bunch of such errors to be found. Thanks once again!
11/03/2022, 11:55 AM
@Andrey Pechkurov ive created a file containing some representative bugs and table schemas or insert stmts that might be helpful for reproduce them. lemme send it your way
one pain point i found in testing is that there’s no
stmt in questdb. it is hard to reset the db into a clear state by code in each run. if you know any tricks to do so, pls help 😄 it would make it much easier to read the logs and send queries to reproduce.
11/03/2022, 12:13 PM
No tricks, but you could run
and then drop the tables one by one
11/03/2022, 12:24 PM
i tried this. but this didnt workout (it causes some NPEs since we can only remove tables in
but some args are only set after this func returns. i guess i’ll stick with what i have for now)
11/03/2022, 12:37 PM
if you can stop the database in your tests, you can stop it, delete the root dir and restart
should be the same as
11/03/2022, 12:38 PM
yes i figured this. im deleting the root dir and restart after each run/ but not each sqlancer thread run.