Hello.


> How to force to kill process which make lock of table ? since PHP make

> many persistent connection to MySQL and i don't know

> which one is locking the table :(



You may get information about processes on your MySQL server using SHOW 
PROCESSLIST

and kill the weird process with the KILL. See:



  http://dev.mysql.com/doc/mysql/en/kill.html

  http://dev.mysql.com/doc/mysql/en/show-processlist.html



  

Ady Wicaksono <[EMAIL PROTECTED]> wrote:

> I have an PHP that do application

> 

> 

> $sql = "SET AUTOCOMMIT=0";

> 

> $db->execQuery($sql);

> 

> $sql = "DELETE FROM TABLE X WHERE...";

> if($db->execQuery($sql)){

>    print "ERROR ";

>    exit(0);

> }

> 

> $sql  = "INSERT INTO TABLE ....";

> 

> if($db->execQuery($sql)){

>    print "ERROR ";

>    exit(0);

> }

> 

> I have a persistent connection to MySQL

> 

> DELETE is succeed, but INSERT IS FAILED and i simply exit,

> i know that i should do ROLLBACK OR COMMIT OR SET AUTOCOMMIT=1 before exit

> However, if i don't do it, another session will wait for this PHP 

> session to finish his transaction and lock wait timeout will arise

> 

> How to force to kill process which make lock of table ? since PHP make 

> many persistent connection to MySQL and i don't know

> which one is locking the table :(

> 

> 

> 

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




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

Reply via email to