What I need is to set the values of all the fields of a record with a particular key (the key is composite actually), inserting the record if there is no record with such a
When using REPLACE instead of INSERT ... ON DUPLICATE KEY UPDATE, I sometimes observe key locking or deadlock problems when multiple queries arrive quickly for a given key. The atomicity of the latter (in addition to not causing cascade deletes) is all the more reason to use it.