[Monetdb-developers] A SERIOUS CONCURRENCY CONTROL BUG

oursql oursql at gmail.com
Tue Mar 9 10:06:53 CET 2010


There is a bug in monetdb, you can run the following script in two clients(mclient.exe), and before test, please disable autocommit option.

user A:                                                                                USER B:
CREATE TABLE TEST(C1 INT PRIMARY KEY, C2 INT);
INSERT INTO TEST VALUES(1,1);
COMMIT;

SELECT C2 FROM TEST WHERE C1=1;

SELECT C2 FROM TEST WHERE C1=1;

UPDATE TEST SET C2=10 WHERE C1=1;
                                                                                           UPDATE TEST SET C2=30 WHERE C1=1;

COMMIT; 
                                                                                           COMMIT;--CONFLICT, NEED TO ROLLBACK;

                                                                                           ROLLBACK;

                                                                                           UPDATE TEST SET C2=30 WHERE C1=1;
                                                                                           
                                                                                           SELECT C2 FROM TEST WHERE C1=1;
                                                                                           --THE RESULT IS 10, NOT 30.   TOO BAD!

2010-03-09 



oursql 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20100309/c8533134/attachment.html>


More information about the developers-list mailing list