1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 xf_search TABLE crash

Discussion in 'Troubleshooting and Problems' started by p3gator, Sep 20, 2012.

  1. p3gator

    p3gator Member

    Is there a way to replace the xf_search table after it has crashed? I have run check/analyze/repair, and while the forum comes back up and will allow searches, it continues to crash. No mods, running 1.1.2, mysqli. Nothing has changed recently with my server lineup. Wondering if there is an option to drop the xf_search table, and add it back in.

    Thanks.

    John
     
  2. borbole

    borbole Well-Known Member

    Yes, you can readd it again but that would be a temporarily solution. A db table should not keep crashing like that. The best way to go about it would be to talk to your host.
     
  3. p3gator

    p3gator Member

    Concur. Right now I just want to get the search funtion working again on my site. And getting this table running again (without rolling back to a previous backup) is my goal. Then I will investigate what may have caused that table to crash, right now nothing in the server logs point to anything. I suspect I may be dealing with a hardware issue.

    Is there a table schema for xf_search, and are there any interdependencies with other tables that would prevent a drop and add?

    Thank you for your time.
     
  4. borbole

    borbole Well-Known Member

    After you drop the current search table from the db, you can recreate a fresh one with this query:

    Code:
    CREATE TABLE xf_search (
            search_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
            search_results MEDIUMBLOB NOT NULL,
            result_count SMALLINT UNSIGNED NOT NULL,
            search_type VARCHAR(25) NOT NULL,
            search_query VARCHAR(200) NOT NULL,
            search_constraints MEDIUMBLOB NOT NULL,
            search_order VARCHAR(50) NOT NULL,
            search_grouping TINYINT NOT NULL DEFAULT 0,
            user_results MEDIUMBLOB NOT NULL,
            warnings MEDIUMBLOB NOT NULL,
            user_id INT UNSIGNED NOT NULL,
            search_date INT UNSIGNED NOT NULL,
            query_hash varchar(32) NOT NULL DEFAULT '',
            PRIMARY KEY (search_id),
            KEY search_date (search_date),
            KEY query_hash (query_hash)
        ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
    
    Afterwards you might want to rebuilt the search indexes as well.
     
    Jarod and Jake Bunce like this.
  5. p3gator

    p3gator Member

    Worked like a charm, many thanks!
     
    borbole likes this.
  6. borbole

    borbole Well-Known Member

    You are welcome.
     

Share This Page