Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rql_test failes statistically #35

Open
itsofirblink opened this issue Jun 21, 2021 · 3 comments
Open

rql_test failes statistically #35

itsofirblink opened this issue Jun 21, 2021 · 3 comments

Comments

@itsofirblink
Copy link

When running rql_test sometimes the split function gets stuck and gets to a point of out of memory.
After a lot of debugging i found out that the way the equalExp function implemented is wrong.

The check

if s1[i][0] == '(' && s2[j][0] == '(' {
    found = equalExp(s1[i][1:len(s1[i])-1], s2[j][1:len(s2[j])-1])
}

is wrong because if we get ( at the start we are removing the end of the string, not the next ) found which is the problem
there is a corruption of data (a = b AND c = d) OR (a = c AND (c = d OR d = f)) will be a = b AND c = d) OR (a = c AND (c = d OR d = f)

The problem starts here and get to the split function which is not validating the given data and not breaking out of the while loop after it failes at the start with finding )

@a8m
Copy link
Owner

a8m commented Jun 21, 2021

Thanks for reporting this @itsofirblink. Please feel free to send a patch and tag me there. Thanks 🙏

@itsofirblink
Copy link
Author

@a8m should i open a PR? or send it here :)

@a8m
Copy link
Owner

a8m commented Jun 30, 2021

Please open a PR 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants