LP#
1509479: fix infinite loop bug in QueryParser
An unclosed phrase search that has a modifier can cause QueryParser to
enter an infinite loop, tying up open-ils.storage backends.
Examples of such searches include:
-"cats and dogs
subject:+"physical chemistry
This patch fixes the bug by allowing the end of the query string
to terminate a phrase (in addition to a quotation mark).
To test:
[1] Verify that the t/21-QueryParser.t unit test passes
[2] To test in a *development* database, before applying the patch
run one of the example queries. Observe that no
results are returned, and that one of the open-ils.storage
drones is running at 100% CPU.
[3] Apply the patch and restart the open-ils.storage service.
[4] Try the query again; this time, it should return results
immediately without causing an open-ils.storage drone to
peg a CPU.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>