I have a MySQL DB and an innoDB table in it. I have a php page that connects, locks the table, does some updates, then unlocks the table. The PHP page is being served up with apache via wamp.
The php page uploads a file to the database. I decided to simulate the system crashing by uploading a file that has a size larger than the memory that is allocated to PHP. This definitely caused this error: allowed memory size of 18874368 bytes exhausted (tried to allocate 6176754 bytes). After that, the tables that were locked during the updates are still locked.
The error I get when I try to access the tables after this error is: Table 'a' was not locked with LOCK TABLES. I know that it is a lock problem because I will bring up a SQL prompt and attempt to select from the table that was locked, and it just waits, exactly like it does when the table is locked. If I then kill the Apache process, the statement that I attempted to run in a SQL prompt will finally go through. My guess is that when I kill the Apache process, MySQL realizes that the table lock should be released due to the connection being severed.
Any ideas??