MVCC is a variant of row-level locking, but it avoids locking in many cases and therefore costs less. Implementation mechanisms vary, but most implement non-blocking reads, and writes lock only the necessary rows.

MVCC is implemented by saving a snapshot of the data at a point in time.

The InnoDB MVCC

InnoDB’s MVcc is implemented by storing two hidden columns at the end of each row. One holds the creation time of the row, and the other holds the expiration (or deletion) time of the row. Of course, the storage is not the actual time value, but the system version number. The system version number is automatically incremented each time a new transaction is started. The system version number at the start of the transaction is used as the version number of the transaction and is compared with the version number of each row of records queried.

MVCC only works at REPEATABLE READ and READ COMMITTED isolation levels. None of the other isolation levels are compatible with MVCC