The following deadlock error happens so often that it's driving me and our customers crazy:
SQLSTATE: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction.
I didn't have this issue so often before upgrading to MariaDB 10.2
I can see what queries cause Deadlock by pt-deadlock-logger, and they're never on the same record, two different records, having different data cause the issue.
|db1||2018-10-28T12:38:08||user1||db||tbl1||PRIMARY RECORD||S||w||1||UPDATE `db`.`tbl1` SET `plan` = 'bronze', `price` = 790000, `modified` = '2018-10-28 12:38:08' WHERE `db`.`tbl1`.`id` = 152216|
|db1||2018-10-28T12:38:08||user2||db||tbl1||PRIMARY RECORD||S||w||0||UPDATE tbl1 SET employer_id = 15104 , modified = '2018-10-28 12:38:08' WHERE id = 152198|