Read Consistency Support in MySQL in MySQL

Q

How Does MySQL Handle Read Consistency in MySQL?

✍: FYIcenter.com

A

Read consistency is a concept that describes how consistent the output will be on two subsequent read operations. A read operation is usually a stand alone SELECT statement or a SELECT subquery in a parent statement.

A database server can support up to 3 levels of read consistency:

  • No Read Consistency - Two subsequent read operations will get no consistent output, if other sessions are making changes to the database.
  • Statement-Level Read Consistency - Two subsequent read operations will get consistent output, if they are used as subqueries within a single SQL statement.
  • Transaction-Level Read Consistency - Two subsequent read operations will get consistent output, if they are used as subqueries or SELECT statements within a single transaction.

By default, MySQL server offers the highest level, Transaction-Level Read Consistency, on tables with transaction-safe storage engines, like InnoDB.

 

Transaction Isolation Levels in MySQL

Transaction Roll Back when Session Killed in MySQL

Transaction Management: Commit or Rollback in MySQL

⇑⇑ MySQL Database Tutorials

2017-08-03, 1790🔥, 0💬