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

Results incorrectly returned from cache when using limit #345

Closed
e-gineer opened this issue Jun 4, 2022 · 1 comment · Fixed by #346
Closed

Results incorrectly returned from cache when using limit #345

e-gineer opened this issue Jun 4, 2022 · 1 comment · Fixed by #346
Assignees
Labels
bug Something isn't working

Comments

@e-gineer
Copy link
Contributor

e-gineer commented Jun 4, 2022

When using limit in supported quals the result is cached even for future queries with extra qualifiers. It should not be, since the extra quals can change the underlying data returned that the limit applies to.

> .cache clear
> 
> select ca_id from crtsh_ca_issuer limit 10
+--------+
| ca_id  |
+--------+
| 12951  |
| 835    |
| 13242  |
| 161794 |
| 239631 |
| 1026   |
| 12410  |
| 1096   |
| 213    |
| 5969   |
+--------+

Time: 722.858916ms
> select ca_id from crtsh_ca_issuer where ca_id < 500 limit 10
+-------+
| ca_id |
+-------+
| 213   |
+-------+

Time: 7.175458ms
> .cache clear
> select ca_id from crtsh_ca_issuer where ca_id < 500 limit 10
+-------+
| ca_id |
+-------+
| -1    |
| -1    |
| -1    |
| -1    |
| -1    |
| -1    |
| -1    |
| -1    |
| -1    |
| -1    |
+-------+

Time: 751.22575ms
> 
@e-gineer e-gineer added the bug Something isn't working label Jun 4, 2022
@kaidaguerre
Copy link
Contributor

moving to sdk

@kaidaguerre kaidaguerre transferred this issue from turbot/steampipe Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants