IsolationLevel

IsolationLevel

Postby 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
 

Postby lsc82 » Fri 24 Dec 2004 08:55

It does only happen when query.fetchall is False.

Thanks
lsc82
 

Postby 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.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby 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
lsc82
 

Postby 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.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components