I am trying to feed a table in mysql with information from another table, but when I give the update it returns me this error:
Error: "Lock wait timeout exceeded; try restarting transaction ".
The update code is as follows.
UPDATE mis.basecelmax tbl
SET tbl.obs =
(SELECT max(tmp.obs)
FROM mis.basetemp tmp
WHERE tmp.id = tbl.id)
WHERE tbl.obs IS NULL
AND tbl.id > 0
This happens regardless of how many records I try to update.