Skip to main content

Dirty, Non-Repeatable & Phantom Reads

Learn Dirty, Non-Repeatable & Phantom Reads (Transaction Isolation Levels, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction Three classic anomalies. Dirty read : reading another transaction's uncommitted change. Non-repeatable read : re-reading the same row gives a different value because someone committed an UPDATE. Phantom read : re-running a range query returns extra (or fewer) rows because someone committed an INSERT/DELETE.

More lessons in Transaction Isolation Levels