LOCK TABLE på InnoDB og MyISAM
Will a LOCK TABLE work as expected on a InnoDB type table? Example: LOCK TABLE a WRITE, b WRITE (where a is type InnoDB and b is type MyISAM)?Jeg har læst følgende begrænsning i manualen:
The MySQL LOCK TABLES operation does not know about InnoDB row-level locks set by already completed SQL statements. This means that you can get a table lock on a table even if there still exist transactions by other users who have row level locks on the same table. Thus your operations on the table may have to wait if they collide with these locks of other users. Also a deadlock is possible. However, this does not endanger transaction integrity, because the row level locks set by InnoDB will always take care of the integrity. Also, a table lock prevents other transactions from acquiring more row level locks (in a conflicting lock mode) on the table.
http://dev.mysql.com/doc/mysql/en/InnoDB_restrictions.html
