| 1 |
--source include/have_innodb.inc |
| 2 |
|
| 3 |
# Bug #49164 READ-COMMITTED reports "matched: 0" on compound PK |
| 4 |
# a duplicate of |
| 5 |
# Bug #52663 Lost update incrementing column value under READ COMMITTED |
| 6 |
|
| 7 |
connect (con1,localhost,root,,); |
| 8 |
connect (con2,localhost,root,,); |
| 9 |
|
| 10 |
connection con1; |
| 11 |
SET transaction_isolation = 'READ-COMMITTED'; |
| 12 |
|
| 13 |
CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b)) |
| 14 |
ENGINE=InnoDB; |
| 15 |
|
| 16 |
insert into bug49164 values (1,1,1), (2,2,2), (3,3,3); |
| 17 |
|
| 18 |
begin; |
| 19 |
update bug49164 set c=7; |
| 20 |
select * from bug49164; |
| 21 |
rollback; |
| 22 |
select * from bug49164; |
| 23 |
begin; |
| 24 |
update bug49164 set c=7; |
| 25 |
|
| 26 |
connection con2; |
| 27 |
|
| 28 |
SET transaction_isolation = 'READ-COMMITTED'; |
| 29 |
begin; |
| 30 |
select * from bug49164; |
| 31 |
commit; |
| 32 |
begin; |
| 33 |
--send |
| 34 |
update bug49164 set c=6 where a=1 and b=1; |
| 35 |
|
| 36 |
connection con1; |
| 37 |
rollback; |
| 38 |
select * from bug49164; |
| 39 |
connection con2; |
| 40 |
reap; |
| 41 |
commit; |
| 42 |
connection con1; |
| 43 |
select * from bug49164; |
| 44 |
connection default; |
| 45 |
disconnect con1; |
| 46 |
disconnect con2; |
| 47 |
drop table bug49164; |