nsactional tables. in_transaction -------------- The in_transaction system variable is a session-only, read-only variable that returns 1 inside a transaction, and 0 if not in a transaction. WITH CONSISTENT SNAPSHOT ------------------------ The WITH CONSISTENT SNAPSHOT option starts a consistent read for storage engines such as InnoDB that can do so, the same as if a START TRANSACTION followed by a SELECT from any InnoDB table was issued. See Enhancements for START TRANSACTION WITH CONSISTENT SNAPSHOT. Examples -------- START TRANSACTION; SELECT @A:=SUM(salary) FROM table1 WHERE type=1; UPDATE table2 SET summary=@A WHERE type=1; COMMIT; URL: https://mariadb.com/kb/en/start-transaction/https://mariadb.com/kb/en/start-transaction/