Comment 0 for bug 1251353

Revision history for this message
Mike Rylander (mrylander) wrote :

Dan Wells raised two issues with search here: http://markmail.org/message/qch7yu6rkvmd6ojz

Of those, the second is a new issue. It's root cause is improper use of "local" variables in perl. In addition to (at least) two other bugs, the branch below addresses this, generating the correct SQL for the examples given.

From the relevant commit message:

First, we didn't need to make $last_type local, and it broke explicit
grouping anyway. That's removed, and we now reset that (and a few more
like it) at calls to the top level parse() method.

Second, we are smarter about finding the boundary of atoms. Previous
to this commit, and curly brace could send the parser into a tailspin
from which it would not recover. Now we use alternation instead of
a character class, which is much safer with the default multi-character
float syntax specifier.

Third, as a catch-all, if we can't parse the remained of a query we
now simply say so (when in debug mode) and go away, instead of risking
an infinite loop. We do this via a final, unqualified "else" clause
in decompose().

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=598fcb80f3f3ec384ff15a81dbade58bb6b011f2