mySQL results are horribly stale and triggers are broken
My triggers no longer work. I changed nothing to the database schema or anything.
A lot of results are permanently stale. For example, in one of my sites I have it so that users have a link to see all replies to their comments. It no longer shows new comments there, yet it still shows older ones. It doesnt' affect all queries, but some of them it does.
Everything seems to work perfectly fine on my local development server.
Has anyone ever heard of this before? I'm pretty sure it's not my application and it's a problem with mySQL or my LAMP stack.
Running:
mysql Ver 14.14 Distrib 5.1.37, for debian-linux-gnu (i486) using EditLine wrapper
Ubuntu 9.10
apache 2.2.12
php 5.2.10
Any help is greatly appreciated. If you need log files or anything let me know. I've googled this, haven't found anything, and have no idea where to start.
6 Replies
CHECK TABLE table_name
That'll repair, analyze and optimize all tables in all databases using the mysql root user prompting for a password, try that.
If I were to wipe my ubuntu install and start over, what would I need to save? Clearly the database, website files, and sites-enabled, but is there anything else?
If you run a mysql query (one that returns stale results) at the mysql command line, does it return correct results?
I don't know why triggers aren't working either. I have a comment system. One table for comments, another for posts. When someone inserts a comment into the database, the trigger goes to the post table and updates the comment count field. That doesn't work either for some bizarre reason.
Should I start disabling extensions and see what happens?