Atomic UPDATE in InnoDB vs MyISAM
===

Is the following "compare and swap" MySQL statement always atomic regardless of whether the database is InnoDB or MyISAM?

    UPDATE tbl_name SET locked=1 WHERE id=ID AND locked <> 1;

I ask this because I intend to use this statement to do psudo row-level locking that is compatible with both transactional and non-transactional database tables.  This is the method that is [recommended for MyISAM][1], but I am uncertain as to whether this works for InnoDB since the documentation suggests using transactions instead.

  [1]: http://dev.mysql.com/doc/refman/5.6/en/ansi-diff-transactions.html
