XF 2.0 MySQL statement prepare error

Recep Baltaş

Well-known member
Getting this error when trying to enter a thread:

Code:
XF\Db\Exception: MySQL statement prepare error [1932]: Table 'technopa_xenforo2.xf_post' doesn't exist in engine in src/XF/Db/AbstractStatement.php at line 212
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 79
XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1163
XF\Mvc\Entity\Finder->fetch() in src/XF/Mvc/Entity/Manager.php at line 212
XF\Mvc\Entity\Manager->findByIds() in src/XF/App.php at line 2290
XF\App->findByContentType() in src/XF/ApprovalQueue/AbstractHandler.php at line 82
XF\ApprovalQueue\AbstractHandler->getContent() in src/XF/Repository/ApprovalQueue.php at line 103
XF\Repository\ApprovalQueue->addContentToUnapprovedItems() insrc/addons/SV/SignupAbuseBlocking/XF/Repository/ApprovalQueue.php at line 19
SV\SignupAbuseBlocking\XF\Repository\ApprovalQueue->addContentToUnapprovedItems() insrc/XF/Pub/Controller/ApprovalQueue.php at line 28
XF\Pub\Controller\ApprovalQueue->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1934
XF\App->run() in src/XF.php at line 333
XF::runApp() in index.php at line 13
 
In short, you've had some sort of database corruption. Given that this is your post table, you'll basically have no option but to restore from a backup.
 
Yes this is a live forum and yes, this is running on MariaDB 10.2. Restrating MairaDB solved the problem but it appeared again after some hours. I do not want to revert to a backup. The site is running fine now but how can I find the culprit so it does not occur again?
 
  • Like
Reactions: rdn
If the forum truly works after restarting, then it really sounds like you're running into a MariaDB bug, though you may find that you really have issues in the database. So roughly, treat it like a failing hard drive: get your data out as quickly as possible while it's still working. Take a full dump of the database (using something like mysqldump). On the assumption that you can't make further software changes, restore that to a totally new database and adjust config.php to point to that.

Then make sure that you're taking regular database backups as well.
 
Back
Top Bottom