The problem is that newer versions of mysql does not allow users to lock tables when using myisam tables.
This is getting weirder with every response ...
Do you happen to know which MySQL version you're on? If you have phpMyAdmin installed, it should quote the version number right on its front page. Otherwise, have a look at one of your backup files, they should have it in their header.
Here's a few quotes from the MySQL manual (
here):
If you are going to run many operations on a set of MyISAM tables, it's much faster to lock the tables you are going to use. Locking MyISAM tables speeds up inserting, updating, or deleting on them.
If you are using a storage engine in MySQL that doesn't support transactions, you must use LOCK TABLES if you want to ensure that no other thread comes between a SELECT and an UPDATE.
(Where "storage engine" refers to the different tables types that MySQL supports - MyISAM tables don't support transactions.)
So, in other words, MySQL AB (the makers of MySQL)
recommend using table locks on MyISAM tables, at least for certain operations.
I could not find any mention of table locks on MyISAM tables not being supported on later versions of MySQL, but I'm willing to dig through the release notes (hence the question which version you're on).
bye, Dirk