我已经阅读了大约4个隔离级别:
Isolation Level Dirty Read Nonrepeatable Read Phantom Read
READ UNCOMMITTED Permitted Permitted Permitted
READ COMMITTED -- Permitted Permitted
REPEATABLE READ -- -- Permitted
SERIALIZABLE -- -- --
我想了解每个事务隔离对表的锁定
READ UNCOMMITTED - no lock on table
READ COMMITTED - lock on committed data
REPEATABLE READ - lock on block of sql(which is selected by using select query)
SERIALIZABLE - lock on full table(on which Select query is fired)
以下是在事务隔离中可能发生的三种现象:
脏读 -无锁
不可重复读 -无脏读作为对已提交数据的
锁定
幻像读 -锁定sql块(使用select查询选择)
我想了解在哪里定义这些隔离级别:仅在jdbc / hibernate级别或在DB中定义