WordPress database error Got error 1 from storage engine

Home Forums BulletProof Security Pro WordPress database error Got error 1 from storage engine

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11993
    AITpro Admin
    Keymaster
    [13-Dec-2013 09:06:57 UTC] WordPress database error Got error -1 from storage engine for query SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (4349) ORDER BY t.name ASC made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_object_term_cache, wp_get_object_terms

    This is a work in progress.  Will be trying a database repair first and then if that does not work then will install a WordPress Revision plugin that will hopefully find and correct these “orphaned” DB entries.  If that does not work then manually attempting to remove the invalid DB entries is the only option left.

    I believe this php error is caused by manually removing/deleting Post Revisions by searching the wp_posts DB table for “revision” and then deleting post revisions.  Since revision data is stored in several different DB Tables I believe this causes database corruption or “orphaned” (may not be the correct technical term for this) DB entries.

    What I noticed was this:

    Searching the DB for “4349” shows this:

    In the wp_posts Table these DB entries are being saved to post_name instead of being saved to post_status.  I assume this problem was caused by breaking the Join by deleting the post revisions incorrectly.

    4349-autosave-v1

    4349-revision-v1

    Related WordPress.org topics
    http://wordpress.org/support/topic/a-series-of-database-errors-that-i-have-no-idea-how-to-fix?replies=3

    #12131
    AITpro Admin
    Keymaster

    The errors are not related to Post revisions or the method I used to delete them.  That appears to be fine and totally unrelated.  The errors occur randomly for different Posts and the queries are all valid so it is not a query problem. The randomness of the errors would indicate a possible server hiccup or maybe some sort of query being run remotely. Maybe via a miner or scraper. Still looking at clues.

    I believe the problem has something to do with object caching.
    http://codex.wordpress.org/Class_Reference/WP_Object_Cache

    /wp-includes/taxonomy.php contains the Query

    if ( ! taxonomy_exists($taxonomy) ) {
    $error = new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
    return $error;
    }
    
    if ( is_object($term) && empty($term->filter) ) {
    wp_cache_add($term->term_id, $term, $taxonomy);
    $_term = $term;
    } else {
    if ( is_object($term) )
    $term = $term->term_id;
    if ( !$term = (int) $term )
    return $null;
    if ( ! $_term = wp_cache_get($term, $taxonomy) ) {
    $_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND t.term_id = %d LIMIT 1", $taxonomy, $term) );
    if ( ! $_term )
    return $null;
    wp_cache_add($term, $_term, $taxonomy);
    }
    }
    #12432
    AITpro Admin
    Keymaster

    In the end these errors show up randomly so most likely these are hacking or spamming probes that cause these errors.  Nothing to fix.  No problems caused.  Just nuisance errors that will show up from time to time that do not have any negative impact on anything whatsoever.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.