My hosting provider doesn't allow temp table creation so my installation throws the following error whenever a search is attempted:

* user warning: Access denied for user: 'accessmagc249151@%' to database 'drupal_accessmag_com' query: CREATE TEMPORARY TABLE temp_search_sids SELECT i.type, i.sid, SUM(i.score * t.count) AS relevance, COUNT(*) AS matches FROM search_index i INNER JOIN search_total t ON i.word = t.word INNER JOIN node n ON n.nid = i.sid INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (i.word = 'directory') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 in /services/webpages/a/c/accessmag.com/public/drupal-5.1/includes/database.mysql.inc on line 172.
* user warning: Table 'drupal_accessmag_com.temp_search_sids' doesn't exist query: SELECT MAX(relevance) FROM temp_search_sids in /services/webpages/a/c/accessmag.com/public/drupal-5.1/includes/database.mysql.inc on line 172.

My question is whether anyone else has run into this and has any suggestions on how to overcome it?

Thanks!
Kirk

Comments

Gone-1’s picture

Yes there is a mod to do that google it. (I can't remember it but I've got drupal fully functional on MySQL 4.024, PHP 4.3.3, no temp or lock/unlock privileges no .htaccess etc.)

robertdouglass’s picture

Try searching using the views_fastsearch module. You make a view that is all the published nodes on your site with the views module, then expose the views fastsearch keyword filter. You can even replace the main search box with the filter form... though I forget exactly how that's done. It has something to do with the way search module calls its search form. Doug Green could elaborate on that last bit.

- Robert Douglass

-----
Lullabot | my Drupal book

KirkC’s picture

I downloaded and installed the views_fastsearch module and created a view with the filter exposed. When I enter a term and click the submit button, the following errors are thrown:

* user warning: Access denied for user: 'accessmagc249151@%' to database 'drupal_accessmag_com' query: CREATE TEMPORARY TABLE temp_search_sids SELECT i.type, i.sid, SUM(i.score * t.count) AS relevance, COUNT(*) AS matches FROM search_index i INNER JOIN search_total t ON i.word = t.word WHERE (i.word = 'movieola') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 in /services/webpages/a/c/accessmag.com/public/drupal-5.1/includes/database.mysql.inc on line 172.
* user warning: Table 'drupal_accessmag_com.temp_search_sids' doesn't exist query: SELECT MAX(relevance) FROM temp_search_sids in /services/webpages/a/c/accessmag.com/public/drupal-5.1/includes/database.mysql.inc on line 172.

Looks like this method tries to use temp tables as well.

Ideas?

- Kirk

------
agency71.com - Soon to be Drupal'd :)

KirkC’s picture

Prior to MySql 3.23 the mechanism of temp tables didn't exist so Heap tables were used - code snippet example:

CREATE TABLE TempTable ( ID int, Name char(100) ) TYPE=HEAP;
LOCK TABLE TempTable WRITE;
INSERT INTO TempTable VALUES( 1, "Foo bar" );
SELECT * FROM TempTable;
DROP TABLE TempTable;
UNLOCK TABLES;

(quoted with thanks from the article here : http://www.devwebpro.com/devwebpro-39-20010817Temporary-Tables-With-MySQ... )

Would modifying the temp table function db_query_temporary in includes/database.mysql.inc to use methodology such as above be a feasible, if inelegant, possible solution?

- Kirk

------
agency71.com - Soon to be Drupal'd :)