XF 2.2 MySQL query error [126]: xf_search_index.MYI is corrupt; try to repair it

BassMan

Well-known member
I got this error when I was on XenForo 2.2.6 Patch 1 (now I've upgraded to Patch 2):

Code:
Server error log
XF\Db\Exception: MySQL query error [126]: Index for table './.../xf_search_index.MYI' is corrupt; try to repair it src/XF/Db/AbstractStatement.php:228
Generated by: ... 20. Jul 2021 at 12:46
Stack trace
INSERT  INTO `xf_search_index` (`content_type`, `content_id`, `title`, `message`, `metadata`, `item_date`, `user_id`, `discussion_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE title = VALUES(title), message = VALUES(message), metadata = VALUES(metadata), item_date = VALUES(item_date), user_id = VALUES(user_id), discussion_id = VALUES(discussion_id)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 126, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 126, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Search/Source/MySqlFt.php(96): XF\Db\AbstractAdapter->insert('xf_search_index', Array, false, 'title = VALUES(...')
#5 src/XF/Search/Search.php(40): XF\Search\Source\MySqlFt->index(Object(XF\Search\IndexRecord))
#6 src/addons/Andy/EasySearch/XF/Search/Search.php(12): XF\Search\Search->index('post', Object(SV\LiveContent\XF\Entity\Post), true)
#7 src/XF/Behavior/Indexable.php(46): Andy\EasySearch\XF\Search\Search->index('post', Object(SV\LiveContent\XF\Entity\Post), true)
#8 src/XF.php(365): XF\Behavior\Indexable->XF\Behavior\{closure}()
#9 src/XF/Mvc/Dispatcher.php(156): XF::triggerRunOnce(true)
#10 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#12 src/XF.php(512): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

Not sure if this is from an add-on and what to do next. Any help is appreciated.
 
Solution
Try to repair the xf_search_index table - you can use phpMyAdmin or a command to do that (depending on your preference).

If that doesn't work rebuild the search index in the ACP.
Looks like from "/addons/Andy/EasySearch/"?

 
Try to repair the xf_search_index table - you can use phpMyAdmin or a command to do that (depending on your preference).

If that doesn't work rebuild the search index in the ACP.
 
Solution
Back
Top Bottom