Unix Technical Forum

is it possible to test row lock in mysql ?

This is a discussion on is it possible to test row lock in mysql ? within the MySQL forums, part of the Database Server Software category; --> Hello sometime i need to lock for a while a record. For example, a table of invoice, and a ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 10:04 AM
patrice
 
Posts: n/a
Default is it possible to test row lock in mysql ?

Hello

sometime i need to lock for a while a record.
For example, a table of invoice, and a table of line of invoice.

When a user want to modify lines of an invoice, i lock the invoice against
write/delete while the user take time to modify lines.
and if another user want to modify the same invoice, he get a nice message
like "this invoice is beeing modified by another user"

I can use "begin; select * from invoice where idinvoice=x for update" before
letting the user modifying lines.
but if another user come for the same invoice, he got a big timeout.
is there a way to just test if a row a locked to avoid the timeout ?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:41 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com