The question is rather simple but I couldn't find a precise answer: In a myisam db, what happens if a php file locks a table (with an atomic operation, say an INSERT) and another php file tries to access the same table (reading or writing)?
Now, while it is obvious that the second session will not be able to access the table, what exactly happens? Does it return some kind of error? Does it wait in queue until it is able to access it?