SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Read lock on mysql table

    Hello all,

    I have a project at hand. It need the application to acquire lock on a row while it is being read so that no two persons can read one row simultaneously.

    Can mysql offer this locking mode? Or should I move this feature to the application level instead of the db level.

    ANticipating a response.

    Thanks

    Michael

  2. #2
    SitePoint Evangelist ldivinag's Avatar
    Join Date
    Jan 2005
    Location
    N37 33* W122 3*
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, but only if the engine being used is INNODB:
    http://dev.mysql.com/doc/refman/5.0/...l-locking.html

    otherwise, myISAM uses table locks...

    just curious, why a lock on reads?
    leo d.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •