Using LIMIT 1 causes MySQL to warn in certain configurations:
[Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: UPDATE sessions SET expires = 1524671478 WHERE session_id = '.......' LIMIT 1
The LIMIT clause is unnecessary anyway because session_id is PRIMARY KEY so the SQL optimizer knows there can be at most only one row touched.
Using LIMIT 1 causes MySQL to warn in certain configurations:
[Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: UPDATE
sessions
SETexpires
= 1524671478 WHEREsession_id
= '.......' LIMIT 1The LIMIT clause is unnecessary anyway because session_id is PRIMARY KEY so the SQL optimizer knows there can be at most only one row touched.