Opened 10 years ago

Closed 8 years ago

#10976 closed bug (fixed)

[BFS] Inconsistent query results between theoretically comparable predicates for certain filenames

Reported by: anevilyak Owned by: axeld
Priority: normal Milestone: R1
Component: File Systems/BFS Version: R1/Development
Keywords: Cc: degea@…
Blocked By: Blocking:
Platform: All

Description

Attached is a test program which creates a test file on the boot volume, whose name contains a single quotation mark. It then attempts to query the volume for said file, using both a simple predicate constructed by hand, as well as one generated automatically via the RPN-style Push*() methods. The former finds the file as expected. However, the latter does not.

Similar behavior can be observed when asking Tracker to find the file by name, though the latter uses the same RPN methodology to construct the query, with the distinction that 1) it encloses it in wild cards, and 2) it asks for a case insensitive match. Nonetheless, the result is the same, which is to say no results are returned.

Behavior on R5 has not yet been verified, but results will be posted as soon as available. Assigning this ticket to BFS until it can be ascertained if the problem is in BQuery or in BFS's parsing logic.

Attachments (1)

QuotedFilenameQueryTest.cpp (2.2 KB ) - added by anevilyak 10 years ago.

Download all attachments as: .zip

Change History (5)

by anevilyak, 10 years ago

Attachment: QuotedFilenameQueryTest.cpp added

comment:1 by ttcoder, 10 years ago

Cc: degea@… added

comment:2 by pulkomandy, 10 years ago

This is BeOS DevEd 2.1.

I had to do some minor changes to build the code (no BStrng::SetToFormat, and no B_PRId32).

baron@vimba:~/Downloads# ./QuotedFilenameQueryTest
Evaluating volume: BeOS R5
Explicit predicate 'name==querytest".cpp' returned 1 entries.
RPN-generated predicate: (name=="querytest\".cpp")
RPN predicate returned 1 entries.

Evaluating volume: Haiku
Explicit predicate 'name==querytest".cpp' returned 0 entries.
RPN-generated predicate: (name=="querytest\".cpp")
RPN predicate returned 0 entries.

comment:3 by anevilyak, 10 years ago

Looks like that confirms a BFS bug for us then, thanks Adrien!

comment:4 by axeld, 8 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev50884; the query parser honored, but did not remove the escape characters.

Note: See TracTickets for help on using tickets.