Re: InnoDB and locking, UPDATE and SELECT
Posted by:
Rick James
Date: September 13, 2014 12:09AM
With InnoDB, do not use LOCK TABLE; instead use "transactions":
BEGIN;
UPDATE tasks SET isLocked=? WHERE isLocked=0 AND ... ORDER BY lastChecked LIMIT 100;
check for errors
SELECT ... FROM tasks WHERE isLocked=?;
check for errors
COMMIT;
check for errors
Subject
Views
Written By
Posted
1787
September 10, 2014 01:18AM
Re: InnoDB and locking, UPDATE and SELECT
750
September 13, 2014 12:09AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.