MySQL Forums
Forum List  »  InnoDB

Metadata Locks
Posted by: Allan Rofer
Date: March 04, 2014 05:26PM

MySQL as of 5.5 has added metadata locks and the following behaviors:


- The concept of an open transaction is extended so that ANY select statement execution causes a transaction to “open”.
- The execution of a DDL statement on a table with an open transaction will wait forever (or until a SQL timeout occurs).

This behavior is not matched in other DBMS's like Oracle or MS SQL Server. I suspect that MySQL is the first DBMS ever to implement this behavior.

A transaction should not be opened until a "select ... for update" is done and/or an INSERT/UPDATE/DELETE operation is started.

The behavior causes existing applications to fail by hanging forever in ddl statements because a metadata lock was obtained by a simple select statement.

I think this is a bug.

Options: ReplyQuote


Subject
Views
Written By
Posted
Metadata Locks
1740
March 04, 2014 05:26PM
683
March 05, 2014 10:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.