A three-term advanced title search with one of the two operators' being "OR", such as "Author = Zelazny AND Title = Conrad OR Title = This Immortal", can cause mySQL to bog down, hang, or take other errors. The reason for this is the generated query is just a string of ungrouped AND clauses, and the addition of an OR clause into it produces an incomplete join, resulting in a cross-product result effect. The huge volume seems to send mySQL off the deep end, effectively hanging the database.
Advanced author search and advanced pub search do not have this problem, as they do not attempt to do joins the same way (they use IN with sub-selects).
Anonymous
This is fixed by the 30-AUG-2009 commits of ta_search.py (1.7) and tp_search.py (1.7):
(1) Pull all join clauses (x.id = y.id) out and append them at the end. Modified makeSQLTerm to return a separate array of the join clauses, and modified all clause-building cases to supply these and omit them from the "clause".
(2) Wrap all of the user-generated clauses in parentheses. Also, if two operators are present and only one of them is an OR, wrap it and the terms on either side of it in parentheses as well.
Implemented in r2009-19.