MySQL error code: 1205. Waiting lock timeout during upgrade with internal connection

I am trying to update a field Time_Stampin my table simple_pack_datato match the values ​​in a similarly named field in my table temp_data. Each table has fields with a name Test_Numberand Time_Markerthat I use for INNER JOINtables. Time_Markercorresponds to the number of samples, where Time_Stampis the actual time from the start of the test.

I want to update Time_Stampone test at a time, so the code I tried:

UPDATE simple_pack_data s
INNER JOIN (
    SELECT *
    FROM temp_data t
    WHERE t.Test = "3"
    ) AS tmp
ON s.Test_Number = tmp.Test_Number AND s.Time_Marker = tmp.Time_Marker
SET s.Time_Stamp = tmp.Time_Stamp
WHERE s.Test_Number = "3";

When I run this, it takes more than 50 seconds and I get error 1205. If I run a similarly structured select statement:

SELECT *
FROM simple_pack_data s
INNER JOIN (
    SELECT *
    FROM temp_data t
    WHERE t.Test = "3"
    ) AS tmp
ON s.Test_Number = tmp.Test AND s.Time_Marker = tmp.Time_Marker
WHERE s.Test_Number = "3";

, , . ? , , ?

+4
2

MySQL, . MySQL, , .

MySQL . Access, , , .

+1

@Twelfth , , !!!:

MySql PostgreSQL

. innodb_lock_wait_timeout,
http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_lock_wait_timeout
, 50 .

SET:
http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
:

SET innodb_lock_wait_timeout=500;
0

All Articles