Problems to see READ UNCOMMITED Transactions...

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
RNOVAK
Posts: 26
Joined: Sat 19 Feb 2011 18:30
Contact:

Problems to see READ UNCOMMITED Transactions...

Post by RNOVAK » Tue 22 Nov 2011 19:25

I have some Semaphores implemented through MySQL, I am converting from Zeos and ADO to DBEXPress but it isn't working with drivber from Devart. Other connections need to see the semaphores on READ UNCOMMITED connections, but the semaphores don't appear... Ex.:


User on Station 1:
Starts Semaphore as:
//
...
TD.TransactionID := 1;
TD.IsolationLevel := xilCustom;
MyQuery.Text := 'SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;';
MyQuery.ExecSQL;

MyConn.StartTransaction(TD);
MyQuery.SQL.Text := 'insert into MySemaphoreTable (MyValue) values (''ak2'');';
MyQuery.ExecSQL;
....
//The rollback happens after 10 min, never occurs commit, or can occur automatic rollback too because lost connectios. Other connections READ COMMITED never see the 'ak2'. in this time other users must see the 'ak2' through READ UNCOMMITED especilized connections

//
Other user on Station 2:
TD.TransactionID := 1;
TD.IsolationLevel := xilCustom;
MyQuery.Text := 'SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;';
MyQuery.ExecSQL;
MyConn.StartTransaction(TD);
MyQuery.SQL.Text := 'Select * from MySemaphoreTable where MyValue = ''ak2'';'
MyQuery.Open; //==> The problem is here, the query must to return 1 record but is empty ...

On DBExpress from RadStudio or ADO works fine.
Codes on Delphi 2010 and MySQL 5.1 and 5.5

Roberto Novakosky

AndreyZ

Post by AndreyZ » Wed 23 Nov 2011 17:01

Hello,

Thank you for the information. We have reproduced this problem and fixed. This fix will be included in the next dbExpress driver for MySQL build.

Post Reply