(fix) Search Not operator#15923
Merged
acolombier merged 1 commit intomixxxdj:2.5from Feb 1, 2026
Merged
Conversation
Member
Author
|
Tests fail because they expect the literal SQL strings |
5f2a731 to
6c5d47c
Compare
Member
Author
|
Hmm, I missed some occurences in the parser tests, but why do they succeed on macOS 15?? |
6c5d47c to
15e6e50
Compare
15e6e50 to
5ef2eb3
Compare
Member
Author
|
Alrigthy, I managed to updat all parser tests (my regex had some flaws and I was to lazy to manually check all tests ; ) |
acolombier
approved these changes
Feb 1, 2026
Member
acolombier
left a comment
There was a problem hiding this comment.
LGTM. Tested and the change fixes the issue. Thank you!
Member
Author
|
Thanks for your quick review! |
Member
Author
|
And now I know why I always got so little results when searching for (interesting that I fully trusted the Mixxx query parser and only started investigating it after that report in the forums) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15918
The issue
was apparently that NULL values in any of the search columns cause trouble with the true/false/NULL logic in SQL.
I only know little about SQL and just learned about that ^, so after starring at SQL debug for some hours, scratching my head, and before going to sleep and digest -- here's my attempt to explain the issue (feel free to correct me):
When doing an untagged search like
xxxy, all text columns are searched (artist, title, genre, grouping, comment, ..)Relevant part of an untagged text query is
WHERE ((artist LIKE '%xxxy%') OR (album LIKE '%xxxy%') OR ..)-> the outer WHERE keeps rows where ((.. LIKE ..) OR ..) is true (NULL and false are removed)
-> mismatches and NULL are removed
The NOT text query (
-xxxy) would beWHERE NOT ((artist LIKE '%xxxy%') OR (album LIKE '%xxxy%'))-> the WHERE NOT keeps only rows that are false (-> NULL is not false <-)
-> matches and NULL are removed
-> less results than expected
and apparently many of my tracks had NULL in one of these columns, so these tracks were also not shown.
Fix
is also checking for
IS NOT NULLin the TextFilterNode:[column] IS NOT NULL AND [column] LIKE '%[searchterm]%'Note: for testing you can cherry-pick 81741b7 from #14552 (main) to get the track count on the Tracks item label