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

Fix WHERE in(N items) results in table query running N times #5924

Merged
merged 9 commits into from
Oct 26, 2019

Conversation

packetzero
Copy link
Contributor

Attempt to port fix for 5379 to new branch. Some changes I noticed from v3.3.1 branch:

  • now that there's a colsUsedBitset
  • loop to fill colsUsed set is considering aliases

osquery/sql/virtual_table.cpp Show resolved Hide resolved
osquery/sql/virtual_table.cpp Outdated Show resolved Hide resolved
osquery/sql/virtual_table.cpp Outdated Show resolved Hide resolved
osquery/sql/virtual_table.cpp Outdated Show resolved Hide resolved
osquery/sql/virtual_table.cpp Outdated Show resolved Hide resolved
osquery/sql/virtual_table.cpp Outdated Show resolved Hide resolved
osquery/sql/virtual_table.cpp Show resolved Hide resolved
osquery/sql/virtual_table.cpp Show resolved Hide resolved
osquery/sql/virtual_table.cpp Show resolved Hide resolved
@theopolis
Copy link
Member

Thanks for clarification @packetzero, switching the ints to size_t and this should be good to go!

theopolis
theopolis previously approved these changes Oct 25, 2019
@theopolis theopolis changed the title 5379 sqlite indexing Fix WHERE in(N items) results in table query running N times Oct 25, 2019
@theopolis
Copy link
Member

@packetzero, are the slight changes to the tests enough to assure this does not regress? Is there something we can test to enforce the expected IN() behavior?

@theopolis theopolis closed this Oct 26, 2019
@theopolis theopolis reopened this Oct 26, 2019
@theopolis
Copy link
Member

(closed+opened this PR to re-trigger the builds)

@packetzero packetzero closed this Oct 26, 2019
@packetzero packetzero reopened this Oct 26, 2019
@theopolis theopolis merged commit 08e0b90 into osquery:master Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants