CodePudding user response:
Based on the transaction and binlog do undoCodePudding user response:
Mysql rollback mechanism is to rely on the bottom of the undo log, and undo log is recorded the reverse logic of SQL statement execution, such as: execute an INSERT statement, the undo log records a logic instead of DELETE statement; Execute an UPDATE statement, you can record a UPDATE statement to restore the original data, after the transaction rollback, you can return to the initial state of the data,