InnoDB - Check for a row lock

This is a discussion on InnoDB - Check for a row lock within the MySQL Database forums, part of the Database Forums category; I searched entire MySQL doc for info about how to check if row (InnoDB) is locked for write but i ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2006
Artur Baæ
 
Posts: n/a
Default InnoDB - Check for a row lock

I searched entire MySQL doc for info about how to check if row (InnoDB) is
locked for write but
i didnt found anything.
Supose we have 2 transactions
1st transaction do
SELECT some_field FROM table_a FOR UPDATE;
2nd transaction wants do check if row is in lock for write before
it isues SELECT some_field FROM table_a FOR UPDATE;
How to check ?
SELECT .. FOR UPDATE - causes client app to hang, server waits as long as
first transaction issue commit command...

Artur


Reply With Quote
  #2 (permalink)  
Old 04-15-2006
Heikki Tuuri
 
Posts: n/a
Default Re: InnoDB - Check for a row lock

Artur,

you need to use innodb_lock_monitor:

http://dev.mysql.com/doc/refman/5.0/...b-monitor.html

Best regards,

Heikki

Oracle Corp./Innobase Oy
InnoDB - transactions, row level locking, and foreign keys for MySQL

InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
tables
http://www.innodb.com/order.php


"Artur Baæ" <nospam_artur@ebasoft.com.pl> kirjoitti
viestissä:e1eags$f30$1@news.task.gda.pl...
>I searched entire MySQL doc for info about how to check if row (InnoDB) is
>locked for write but
> i didnt found anything.
> Supose we have 2 transactions
> 1st transaction do
> SELECT some_field FROM table_a FOR UPDATE;
> 2nd transaction wants do check if row is in lock for write before
> it isues SELECT some_field FROM table_a FOR UPDATE;
> How to check ?
> SELECT .. FOR UPDATE - causes client app to hang, server waits as long as
> first transaction issue commit command...
>
> Artur
>
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0