Created
June 30, 2015 07:16
-
-
Save perepechaev/22bc7e8e341164ff0ac9 to your computer and use it in GitHub Desktop.
This file contains 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 characters
### Первый клиент | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment