时间:2012-04-01 18:50:08 作者: 来源:
点击:
| 4 | | | SELECT VACCOUNT_ID from account where ID =1001; | uncommitted |
5 | SELECT VACCOUNT_ID from account where ID =1001; | uncommitted | | |
6 | | | ROLLBACK; | |
7 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
8 | COMMIT; | | | |
tx_isolation:SET GLOBAL tx_isolation=’read-committed’ |
ID | 事务1 | 事务1输出 | 事务2 | 事务2输出 |
1 | START TRANSACTION; | | | |
2 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
3 | | | START TRANSACTION; | |
4 | | | UPDATE account set VACCOUNT_ID=’uncommitted’ where ID =1001; | |
5 | | | SELECT VACCOUNT_ID from account where ID =1001; | uncommitted |
6 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
7 | | | COMMIT; | |
8 | SELECT VACCOUNT_ID from account where ID =1001; | uncommitted | | |
9 | COMMIT; | | | |
tx_isolation:SET GLOBAL tx_isolation=’REPEATABLE-READ’ |
ID | 事务1 | 事务1输出 | 事务2 | 事务2输出 |
1 | START TRANSACTION; | | | |
2 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
3 | | | START TRANSACTION; | |
4 | | | UPDATE account set VACCOUNT_ID=’uncommitted’ where ID =1001; | |
5 | | | SELECT VACCOUNT_ID from account where ID =1001; | uncommitted |
6 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
7 | | | COMMIT; | |
8 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
9 | COMMIT; | | | |
tx_isolation:SET GLOBAL tx_isolation=’SERIALIZABLE’ |
ID | 事务1 | 事务1输出 | 事务2 | 事务2输出 |
1 | START TRANSACTION; | | | |
2 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
3 | | | START TRANSACTION; | |
4 | | | UPDATE account set VACCOUNT_ID=’uncommitted’ where ID =1001; | STATE: Updating |
5 | SELECT VACCOUNT_ID from account where ID =1001; | caimao101510 | | |
| | | 事务2超时 | |
6 | COMMIT; | | | |
7 | START TRANSACTION; | | | |
8 | UPDATE account set VACCOUNT_ID=’uncommitted’ where ID =1001; | | | |
9 | | | START TRANSACTION; | |
10 | | | SELECT VACCOUNT_ID from account where ID =1001; | STATE:statistics |
11 | | | 事务2超时 | |
12 | commit; | | | |
tx_isolation
|