You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running against MySQL >= 5.1 with STATEMENT based replication the MySQL server logs the following error:
150514 22:59:37 [Warning] Statement may not be safe to log in statement format. Statement: UPDATE delayed_jobs SET locked_at = '2015-05-14 22:59:38', locked_by = 'host:job1-dev.test.host' pid:24358' WHERE ((run_at <= '2015-05-14 22:59:38' AND (locked_at IS NULL OR locked_at < '2015-05-14 22:39:38') OR locked_by = 'host:job1-dev.test.host pid:24358') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1
This is due to non deterministic behaviour of this statement on the master and slave due to the limit 1 and the potential for rows to be returned in a different order.
Appending the id field to the order by will resolve the issue because this field is unique, so rows will always be returned in the same order on the slave as on the master.
The text was updated successfully, but these errors were encountered:
When running against MySQL >= 5.1 with STATEMENT based replication the MySQL server logs the following error:
150514 22:59:37 [Warning] Statement may not be safe to log in statement format. Statement: UPDATE
delayed_jobs
SETlocked_at
= '2015-05-14 22:59:38',locked_by
= 'host:job1-dev.test.host' pid:24358' WHERE ((run_at <= '2015-05-14 22:59:38' AND (locked_at IS NULL OR locked_at < '2015-05-14 22:39:38') OR locked_by = 'host:job1-dev.test.host pid:24358') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1This is due to non deterministic behaviour of this statement on the master and slave due to the limit 1 and the potential for rows to be returned in a different order.
Appending the id field to the order by will resolve the issue because this field is unique, so rows will always be returned in the same order on the slave as on the master.
The text was updated successfully, but these errors were encountered: