I enabled the apachesolr module via drush and was greeted with the following warnings:

Apache Solr framework was enabled successfully.                      [ok]
Search was enabled successfully.                                     [ok]
user warning: Table 'example.apachesolr_search_node' [error]
doesn't exist
query: DELETE FROM apachesolr_search_node in
/var/www/html/drupal-6-sites/all/modules/apachesolr/apachesolr.module
on line 276.
user warning: Table 'example.apachesolr_search_node' [error]
doesn't exist
query: INSERT INTO apachesolr_search_node (nid, status, changed)
            SELECT n.nid, n.status, GREATEST(n.created, n.changed,
c.last_comment_timestamp) AS changed
            FROM node n
            LEFT JOIN node_comment_statistics c ON n.nid = c.nid in
/var/www/html/drupal-6-sites/all/modules/apachesolr/apachesolr.module
on line 281.
user warning: Table 'example.apachesolr_search_node' [error]
doesn't exist
query: UPDATE apachesolr_search_node SET changed = 1255878315 WHERE
changed > 1255878315 in
/var/www/html/drupal-6-sites/all/modules/apachesolr/apachesolr.module
on line 284.
An error occurred at function : drush_pm_enable                      [error]

Do the above queries need to be executed if the required table doesn't exist yet?

Comments

budda’s picture

Title: Eabling apachesolr via drush on a clean Drupal site causes SQL warnings » Enabling apachesolr via drush on a clean Drupal site causes SQL warnings

Correcting typo in the title :)

jpmckinney’s picture

Assigned: Unassigned » jpmckinney
jpmckinney’s picture

Status: Active » Postponed (maintainer needs more info)

This table is created in hook_install and those queries are run in hook_enable, so the table should already exist.

I haven't been able to reproduce the error by running "drush enable apachesolr" on rc3.

I'm using an old drush from 2009/10/26. Maybe it was a bug in drush?

jpmckinney’s picture

Assigned: jpmckinney » Unassigned
jpmckinney’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)