Closed (won't fix)
Project:
Drupal core
Version:
5.x-dev
Component:
search.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2007 at 12:53 UTC
Updated:
4 Jan 2011 at 16:57 UTC
do_search creates temporary tables. If you call it more than one time per page request, you get errors because the temporary tables it tries to create already exist. This problem could be solved by prefixing the name of the temporary table in some way that identifies which search it belongs to (this could ostensibly be the arg(1) part of q).
The use-cases for having two searches per page are many. What if you want to offer search results for content and users at the same time, say in two columns? Or have a block that takes the $keys and does a custom search using the search index to serve contextual ads on the search page? These are the cases I'd like to see supported.
Comments
Comment #1
robertdouglass commentedThis remains a 5.x exclusive issue.
Comment #2
jhodgdonSee also #296284: Bizarre error caused by temporary SQL tables, which I marked as a duplicate of this issue (at least, I think it is).
Comment #3
jhodgdonAnother related issue:
#156668: mysql_pconnect breaks search
Comment #4
jhodgdon7.0 is out tomorrow, 5.x is obsolete, won't fix, sorry.