How InnoDB Multi-Version Concurrency Control (MVCC) works

Abstract

Using a simple running example, we explain how non-locking reads, transaction rollback, and the purge of history works. More specifically, I am going to use a variation of this SQL from MDEV-24402:

CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL, INDEX(b)) ENGINE=InnoDB;
BEGIN;
INSERT INTO t1 VALUES(5,4);
DELETE FROM t1 WHERE a=5;
COMMIT;
BEGIN;
INSERT INTO t1 VALUES(5,5);
ROLLBACK;
CHECK TABLE t1 EXTENDED;
DROP TABLE t1;

Date and time

  • Thursday 17 November, 19:00 – 19:45 CET (UTC+1)

Presenter

Marko Mäkelä
Software developer – MariaDB Corporation

Marko Mäkelä holds a doctoral degree in theoretical computer science. He has worked on the InnoDB storage engine since 2003. He joined MariaDB Corporation in 2016 as Lead Developer InnoDB. He loves to tinker with low-level code, old computers, embedded systems, and bicycles.