Line 802 in source above shows the query is filesets UNION folders and symlinks.
I can’t quickly find a statement on precedence, but maybe it runs left to right, thus:
(expected filesets folders and symlinks EXCEPT filesets) UNION folders and symlinks
thus
I tried using parentheses to set order, but got a syntax error. I’m sure there’s a way.
EDIT:
I tried adding a SELECT * FROM before my previous parenthesis addition. Result:
EDIT 2:
Fiddling with the query, first by ORDER BY “Path” then faster AND “Path” IS NULL:
FilesetEntry table thinks it has a FileID 3838716:
FixedFile table doesn’t. I wonder how old DB is?
Local database describes some of the relationships.
Database rebuild and neighbor posts add some text.