List:General Discussion« Previous MessageNext Message »
From:Dobromir Velev Date:September 8 2005 9:45am
Subject:Re: Locking Methods
View as plain text  
MySQL locks work only until a session expries, so they will not be of much use 
in your case. The best solution will be to implement this logic in your 
application - the simplest method is to add a field to the table which will 
keep the information about whether the specific record is locked or not. Then 
you will have to modify your UPDATE/DELETE queries to not affect locked 

Dobromir Velev

On Wednesday 07 September 2005 23:36, Rich wrote:
> Hi there.
> I started a different thread on this, but then I realized I might not have
> to use InnoDB for this.
> Let me explain what I wish to achieve.
> I want to create records in an established table.  I then want them locked
> (either by locking the whole table or by individual record) so that they
> cannot be updated or deleted.
> That's it.
> I am concerned that locking a table won't allow me to add new records.  I
> also need the records fully viewable.
> Which table format should I choose, and how do I implement this?  I've
> reviewed some of the alternatives, and they got all confusing to me.
> 15.11.3 InnoDB and Transaction Isolation Level indicates that READ
> COMMITTED is what I should be looking for, but it refers to an index that
> I'm unaware of, as nothing is indexed.
> Any leadership appreciated.
> Cheers

Locking MethodsRich7 Sep
  • Re: Locking MethodsDan Nelson8 Sep
  • Re: Locking MethodsDobromir Velev8 Sep