MySQL, update and modify data in the same original data will perform it again?

background

This paper test MySQL update statement is executed for the original data (ie, unmodified) the same update statement will be re-executed inside MySQL do?

test environment

  • MySQL5.7.25
  • CentOS 7.4

binlog_format为ROW

  1. parameter
    Here Insert Picture Description
  2. Test Procedure
    Here Insert Picture Description
    Here Insert Picture Description
    Here Insert Picture Description
  3. to sum up

At binlog_format = row and binlog_row_image = FULL, due to the need to record all of the fields in the MySQL binlog inside, so when reading data will put all the data read out, then the update will not perform duplicate data. That is called MySQL "was changed to (1,55)" This interface provides InnoDB engine, but the engine was found the same value as the original, is not updated, direct return.

binlog_format为STATEMENT

  1. parameter
    Here Insert Picture Description
  2. Test Procedure
    Here Insert Picture Description
    Here Insert Picture Description
    Here Insert Picture Description
  3. to sum up

At binlog_format = statement and binlog_row_image = FULL, InnoDB internal update statement executed carefully, i.e., "the modified value (1,999)," this operation, the lock locked, updates the update.

Guess you like

Origin blog.csdn.net/qq_33235529/article/details/89227547