Why gives mysql the error ER_TABLE_NOT_LOCKED while I just locked the table?
问题 I have some code that does a LOCK TABLE on a table in my database. After the lock, I do a SELECT from this same table. My mysql API interface gives the following error: mysqlsel/db server: Table 'Mytable' was not locked with LOCK TABLES According some googling, this relays to the error code: ER_TABLE_NOT_LOCKED Why would this code generate this error? I would not expect it to give an error if I do not lock it at all, and I certainly do not expect an error if I lock it either. 回答1: I think I