MySQL Forums
Forum List  »  Partitioning

Re: Partitoned table and table locking
Posted by: Phil Hildebrand
Date: June 14, 2008 01:37AM

Are you saying you want to explicitly lock a partition, or are you asking if MySQL will lock a partition only if you insert a row into a given partition?

It depends a little on what you are asking. If you are using innodb, and inserting a row that ends up in partition 1, then only that row in partition 1 should get locked for write. If you are using myisam, then only partition 1 should get locked for write (the whole partition, but not the whole table).

If you alter a table and reorganize a set of partitions, then there should be a write lock on the whole table for the duration of the reorganize.

I don't believe there is any way to throw a specific lock on a partition however, without some kind of select for update.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Partitoned table and table locking
2398
June 14, 2008 01:37AM


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.