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
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.