Title
#users-public
s

Suri Zhang

11/03/2022, 8:52 AM
RE https://github.com/questdb/questdb/issues/595 (sqlancer for QuestDB): I have submitted 1 bug report found by sqlancer (and it is fixed 🎉) work done: test INSERT into tables, ALTER TABLE (only add or drop index), TRUNCATE TABLE generate data for types - Numbers (int & float) , BOOLEAN and NULL WIP: 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 future work: test more sql keywords (e.g. JOIN), test more datatypes (especially SYMBOL and time series), etc@Andrey Pechkurov
8:54 AM
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
Andrey Pechkurov

Andrey Pechkurov

11/03/2022, 8:55 AM
What's the c0 column type?
s

Suri Zhang

11/03/2022, 8:56 AM
CREATE TABLE t7(c0 FLOAT);
8:56 AM
it’s float type
Andrey Pechkurov

Andrey Pechkurov

11/03/2022, 8:58 AM
I can reproduce this one. Let me create a GH issue. Thanks for finding it!
s

Suri Zhang

11/03/2022, 9:01 AM
whooo you beats me! more to come! im getting 100 error logs (well the max is 100) maybe some of them are duplicated.
9:02 AM
btw, shall i update my local questdb version to suppress the create table with index bug?
Andrey Pechkurov

Andrey Pechkurov

11/03/2022, 9:26 AM
A bugfix for today's issue is ready for review: https://github.com/questdb/questdb/pull/2715
9:27 AM
As for the create table bug, I can send you a snapshot version. How do you run QuestDB?
s

Suri Zhang

11/03/2022, 9:28 AM
nvm i deleted the code that triggers the bug. it’s good for now 😄
9:28 AM
since it’s fixed, there’s no point to keep that block in sqlancer
9:32 AM
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)
Andrey Pechkurov

Andrey Pechkurov

11/03/2022, 10:03 AM
Yeah, I'd expect a bunch of such errors to be found. Thanks once again!
s

Suri Zhang

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
12:05 PM
one pain point i found in testing is that there’s no
DROP DATABASE
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.
Andrey Pechkurov

Andrey Pechkurov

11/03/2022, 12:13 PM
No tricks, but you could run
SHOW TABLES;
and then drop the tables one by one
s

Suri Zhang

11/03/2022, 12:24 PM
i tried this. but this didnt workout (it causes some NPEs since we can only remove tables in
createAndTestConnection
but some args are only set after this func returns. i guess i’ll stick with what i have for now)
Andrey Pechkurov

Andrey Pechkurov

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
12:37 PM
should be the same as
drop database
s

Suri Zhang

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.