List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:July 15 1999 1:19pm
Subject:Re: Row Locking!
View as plain text  
Davor Cengija wrote:
> On Thu, 15 Jul 1999, A. Brandic wrote:
> >Just a query.  Does Mysql support "row" level locking?
> >
> >I've loocked in the manual but could not find anything and the TODO list
> >doeasn't say much (except database locking);
>         Table locking (for reading or writing) is what you're looking
>         for. Check the manual.
> --
>       v
> Davor Cengija
> davor@stripped

You can simulate row locking by using a string lock comprised of the
table name plus the primary key value.

This does not actually lock anything in the table, but if your
applications adhere to this convention, you can get the same result
by always getting the lock before updating.

Beware, though. There is NO deadlock protection here, and you may only
hold one lock at a time.
compilation problem...sinisa15 Jul
  • Row Locking!A. Brandic15 Jul
    • Re: Row Locking!Davor Cengija15 Jul
      • Re: Row Locking!Gerald Clark15 Jul
    • Re: Row Locking!Norbert Kolb15 Jul
      • Re: Row Locking!Paul DuBois15 Jul