By charlie_ on
Greetings,
I just discovered why my search queries aren't returning anything. As admin, I get the
following entry when performing any search:
Access denied for user 'ADMIN_USER'@'localhost' to database 'DRUPAL_DATABASE' 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 = 'SEARCH_WORD') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 in /path/to/drupal_install/includes/database.mysql.inc on line 172.
I confirmed, and reapplied the privs to the drupal database for the drupal database user. But
I still get the error. Can anyone suggest why this is happening?
Thank you in advance.
--Charlie
Comments
CREATE TEMPORARY TABLES is
CREATE TEMPORARY TABLES is the problem.
When I setup Drupal, I *attempted* to use the following PHP:
Problem was, MySQL barfed with an error concerning the create_temporary_tables_priv
statement. So I simply re-ran it omitting that statement. So clearly this presents a
problem with searching. Is there any way to add this priv *after* an install?
If so, how should I do it?
Thank you for all your time and consideration.
--Charlie
CREATE TEMPORARY TABLES is incorrect syntax
Greetings,
Well, I have discovered that the syntax for CREATE TEMPORARY TABLES is incorrect.
The correct syntax (for the script I posted above) is
not
as is suggested by the documentation.
Should I report this as a bug?
--Charlie