IsolationLevel

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lsc82

IsolationLevel

Post by lsc82 » Fri 24 Dec 2004 08:53

I'm using D5, MyDac 3.1.13, MySQL 4.0.20a

I have

1 TForm
1 TMyConnection to InnoDB database
- isolationlevel = ilReadUnCommitted
1 tMyTable
1 TMyQuery

than I execute this code:

Connection.StartTransaction;
Table.Append;
Table.FieldByName('ID').AsInteger := 100;
Table.Post;
Query.SQL.Text := 'select * from tablename order by ID desc';
Query.Open;

at the end of this code I see that the query doesn't see the new record inserted by the table, but the isolationlevel should enable this.

I'm I wrong?

Thanks

lsc82

Post by lsc82 » Fri 24 Dec 2004 08:55

It does only happen when query.fetchall is False.

Thanks

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 24 Dec 2004 11:45

The reason of the problem is in using FetchAll = False. In this mode an additional connection is created for a query that not corresponded to a current transaction contextof the main connection.

lsc82

Post by lsc82 » Tue 28 Dec 2004 09:05

Is it possible to avoid this problem?

Can MyDac copy the value of this property from the real connection to this internal connection due to fetchall?

Thanks

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 28 Dec 2004 16:11

We made corresponding corrections in MyDAC code. A new build will be available for download within a month.

Post Reply