Link to home
Start Free TrialLog in
Avatar of SiemensSEN
SiemensSEN

asked on

mysql error: ERROR 1205 (HY000): Lock wait timeout exceeded

Hello,
 I am trying to insert information from one table to another within the same database in mysql. However, I get the error below.

mysql> insert into dev_text
    -> select distinct text.* from text ;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction

Thanks in advance for your help
Avatar of rockiroads
rockiroads
Flag of United States of America image

Judging by the error message, is there another process looking at that table? some sort of lock already on that table or a record?
Avatar of SiemensSEN
SiemensSEN

ASKER

I am sorry but how can I tell if another process is locking this table
are there any other sql statments running at the same time?
also try
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
insert into dev_text
    select distinct text.* from text ;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ ;

Ref: http://stackoverflow.com/questions/917640/any-way-to-select-without-causing-locking-in-mysql
SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't have any other process running.

Also, the timeout parameter is commented  in my.cnf file because I use the MYISAM engine.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial