she*_*onh 3 mysql transactions isolation
我似乎无法在32位x86 Debian上获得MySQL 5.0.32以兑现事务隔离级别.
我已经将问题简化为最简单的形式,使用mysql命令行客户端进行测试:
-- On node writer:
--
DROP TABLE test;
CREATE TABLE test (
name VARCHAR(255)
);
set autocommit=0;
set transaction isolation level read committed;
begin;
-- On node reader:
--
set autocommit=0;
set transaction isolation level read committed;
begin;
-- On node writer:
--
INSERT INTO test VALUES ('bob');
-- On node reader:
--
SELECT * from test;
-- Returns the row with bob in it!!!
Run Code Online (Sandbox Code Playgroud)
可能相关,我注意到在回滚后行仍然存在!
所以我的问题是autocommit并没有真正禁用,因此有效地忽略了事务隔离级别?
Ciao,Sheldon.
您的表似乎MyISAM默认创建.
它不支持交易.
你可以运行以下内容:
SELECT @@storage_engine
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
949 次 |
| 最近记录: |