While the query is still running, type

mysql> show processlist
or
mysql> show full processlist

find the query(ies) with the "State" column having a value of "Locked"

-Sheeri

On 4/7/06, 古雷 <[EMAIL PROTECTED]> wrote:
> Hello:
>
> How could I know  which transaction or thread hold the lock?
>
> For example:
>
> show innodb status\G
>
> ---TRANSACTION 0 78076313, ACTIVE 3906 sec, process no 12729, OS thread id 
> 2952076208 starting index read
> mysql tables in use 1, locked 1
> LOCK WAIT 2 lock struct(s), heap size 1024
> MySQL thread id 268, query id 40997 localhost root Updating
> UPDATE CORPSMSINFO SET PERMISSIONS='10000000000000000000000000000000' WHERE 
> CUSTOMERID='1000000010A'
> ------- TRX HAS BEEN WAITING 13 SEC FOR THIS LOCK TO BE GRANTED:
> RECORD LOCKS space id 0 page no 20032 n bits 192 index `PRIMARY` of table 
> `ea191/CORPSMSINFO` trx id 0 78076313 lock_mode X locks rec but not gap 
> waiting
> Record lock, heap no 122 PHYSICAL RECORD: n_fields 19; compact format; info 
> bits 0
>  0: len 11; hex 3130303030303030313041; asc 1000000010A;; 1: len 6; hex 
> 000004a755e1; asc     U ;; 2: len 7; hex 000000562927be; asc    V)' ;; 3: len 
> 3; hex 415350; asc ASP;; 4: len 4; hex 4435c9e1; asc D5  ;; 5: len 5; hex 
> 61646d696e; asc admin;; 6: len 4; hex 4434cb9b; asc D4  ;; 7: len 4; hex 
> 4434cb9b; asc D4  ;; 8: len 1; hex 30; asc 0;; 9: SQL NULL; 10: SQL NULL; 11: 
> SQL NULL; 12: len 4; hex 4434cb9b; asc D4  ;; 13: len 4; hex 4434cb9b; asc D4 
>  ;; 14: len 1; hex 30; asc 0;; 15: len 2; hex 3220; asc 2 ;; 16: SQL NULL; 
> 17: len 30; hex 313030303030303030303030303030303030303030303030303030303030; 
> asc 100000000000000000000000000000;...(truncated); 18: len 4; hex 80000000; 
> asc     ;;
>
> ------------------
>
> How could I find which one hold that lock?
>
> Regards,
>
> gu lei

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to