WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
[resolved] Bug - 3.1.3 - MySQL error thrown in /var/log/messages (5 posts)

  1. christopherw
    Member
    Posted 1 year ago #

    Hi,

    First of all: excellent plugin, and this error I'm reporting doesn't seem to be a dealbreaker in terms of plugin operation. However it is puzzling.

    Jan  6 07:26:24 node1 httpd: WordPress database error Key column 'type' doesn't exist in table for query ALTER TABLE wp_bs2ojz_relevanssi ADD INDEX 'typeitem'('type','item') made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init\
    '), call_user_func_array, relevanssi_check_old_data

    This is on 3.1.3, WP3.5, CentOS.

    Cheers
    Chris

    http://wordpress.org/extend/plugins/relevanssi/

  2. christopherw
    Member
    Posted 1 year ago #

    Update: figured it might be something to do with the DB not being correctly upgraded or a WP core update mucking some dependency up. Also noticed the indexed count had been stuck at too low a number for a while.

    Deactivated and reactivated the plugin (after clearing the cache and attempting an index rebuild); I got a screen full of WordPress database error "Unknown column 'content' in 'field list' where it was trying to add indexes for keywords.

    The next interesting error was this:

    httpd: WordPress database error Duplicate key name 'terms' for query CREATE INDEX terms ON wp_bs2ojz_relevanssi (term(20)) made by activate_plugin, do_action('activate_relevanssi/relevanssi.php'), call_user_func_array, relevanssi_install, _relevanssi_install, relevanssi_create_database_tables

    And it's not thrown another error yet... Will update if I notice more errors in the logs.

  3. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm... The first error does sound like an update that hasn't upgraded the database. That happens, because WordPress auto plugin upgrade doesn't trigger plugin activation for some reason, and you have to manually deactivate and reactivate the plugin for that to happen.

    Unknown column 'content' sounds a bit worrying, particularly as there's no index on that column.

    I wouldn't worry about the duplicate key error.

    Anyway, if you want to play it safe, you can always remove old versions and do a clean install of the latest version.

  4. jondaley
    Member
    Posted 1 year ago #

    I deactivated and reactivated and that did not help. The errors I am getting are:

    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE TIMESTAMPDIFF(DAY, time, NOW()) <= 30\r, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php
    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] \t\t GROUP BY query\r, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php
    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] \t\t ORDER BY cn' at line 3 for query SELECT COUNT(DISTINCT(id)) as cnt, query, hits\r, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php
    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] \t\t FROM \r, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php
    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] \t\t WHERE TIMESTAMPDIFF(DAY, time, NOW()) <= 30\r, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php
    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] \t\t GROUP BY query\r, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php
    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] \t\t ORDER BY cnt DESC\r, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php
    [Thu Jan 17 13:30:31 2013] [error] [client 24.218.231.131] \t\t LIMIT 20 made by wp_dashboard, do_meta_boxes, call_user_func, gbd_rd_widget, gbd_rd_date_queries, referer: http://alpha.primal-palate.com/wp-admin/options-general.php?page=relevanssi/relevanssi.php

    (It looks like the logtable is somehow not set)

    And the other error is:

    [Thu Jan 17 13:27:33 2013] [error] [client 24.218.231.131] WordPress database error Duplicate key name 'doctermitem' for query ALTER TABLE relevanssi ADD UNIQUE KEY doctermitem (doc, term, item) made by activate_plugin, do_action('activate_relevanssi/relevanssi.php'), call_user_func_array, relevanssi_install, _relevanssi_install, relevanssi_create_database_tables, dbDelta, referer: http://alpha.primal-palate.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=
    [Thu Jan 17 13:27:33 2013] [error] [client 24.218.231.131] WordPress database error Duplicate key name 'terms' for query CREATE INDEX terms ON relevanssi (term(20)) made by activate_plugin, do_action('activate_relevanssi/relevanssi.php'), call_user_func_array, relevanssi_install, _relevanssi_install, relevanssi_create_database_tables, referer: http://alpha.primal-palate.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=
    [Thu Jan 17 13:27:33 2013] [error] [client 24.218.231.131] WordPress database error Duplicate key name 'docs' for query CREATE INDEX docs ON relevanssi (doc) made by activate_plugin, do_action('activate_relevanssi/relevanssi.php'), call_user_func_array, relevanssi_install, _relevanssi_install, relevanssi_create_database_tables, referer: http://alpha.primal-palate.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=
    [Thu Jan 17 13:27:33 2013] [error] [client 24.218.231.131] WordPress database error Duplicate key name 'typeitem' for query CREATE INDEX typeitem ON relevanssi (type, item) made by activate_plugin, do_action('activate_relevanssi/relevanssi.php'), call_user_func_array, relevanssi_install, _relevanssi_install, relevanssi_create_database_tables, referer: http://alpha.primal-palate.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=

    (I didn't look into the code to see where this error is coming from).

  5. jondaley
    Member
    Posted 1 year ago #

    I've now uninstalled and re-installed (and re-did all of the settings, and re-built the index).

    And the error is now gone.

    In my case, the problem might have happened because I keep the code under source control, and so I *might* have upgraded on the main site, and not on this site, and then run my database sync shell script and not updated the files properly. I think I've always updated all of the plugins before doing the sync, but it is possible that I missed it, and so then might be entirely my fault. I'll keep an eye on it, and make sure to always upgrade both sites' files before syncing the database.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic