Created
June 30, 2015 07:16
-
-
Save perepechaev/22bc7e8e341164ff0ac9 to your computer and use it in GitHub Desktop.
Revisions
-
perepechaev created this gist
Jun 30, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ ### Первый клиент mysql-1> SHOW VARIABLES LIKE '%tx_isolation%'; +---------------+-----------------+ | Variable_name | Value | +---------------+-----------------+ | tx_isolation | REPEATABLE-READ | +---------------+-----------------+ 1 row in set (0.00 sec) mysql-1> select * from t1; Empty set (0.00 sec) mysql-1> START TRANSACTION; Query OK, 0 rows affected (0.00 sec) ### Затем второй клиент mysql-2> insert into t1 values(null, 'aaa'); Query OK, 1 row affected (0.00 sec) mysql-2> select * from t1; +----+------+ | id | name | +----+------+ | 1 | aaa | +----+------+ 1 row in set (0.00 sec) ### Возвращаемся в первый клиент mysql-1> select * from t1; +----+------+ | id | name | +----+------+ | 1 | aaa | +----+------+ 1 row in set (0.00 sec) mysql-1> commit; Query OK, 0 rows affected (0.00 sec)