MySQL Forums
Forum List  »  MyISAM

Re: locking question
Posted by: Ingo Strüwing
Date: February 17, 2006 06:14AM

Hi.

All tables are always locked from the start of a statement.

There is only one exception (as far as I know, but I'm quite sure):

CREATE TABLE t1 SELECT ...

The select tables are locked from the start, but t1 does not exist yet. So it is locked later. Unfortunately this exception is a problem and we need to change this eventually. We have some bug reports for this already.

Not locking all tables at the same time leads to deadlocks sooner or later. So the probable solution for the above is to defer the locking until after the creation of the table.

Regards

Ingo Strüwing, Senior Software Developer - Storage Engines
MySQL AB, www.mysql.com

Options: ReplyQuote


Subject
Views
Written By
Posted
2526
February 16, 2006 08:28AM
Re: locking question
1951
February 17, 2006 06:14AM


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.