我似乎无法在 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!!!
可能相关,我注意到即使在回滚后该行仍然存在!
所以我的问题是自动提交并没有真正被禁用,因此事务隔离级别被有效地忽略了?
乔,谢尔顿。