Subject transaction question
Author KjeldLoozen
Gurus,

Could someone please explain the folowing behaviour:

1. I step through code (Zend studio), let a read transaction start
2. I update a record (using IBexpert) but i do not commit that
transaction (in IBexpert)
4. In zend I run the query. But: error: lock conflict on no wait
transaction deadlock

This is the code:

---------
if (!($dbhandle = connectdb()))
die('no connection to database');

$tr =ibase_trans
(IBASE_READ+IBASE_COMMITTED+IBASE_REC_NO_VERSION+IBASE_NOWAIT,$dbhand
le);
$query='select * from v_artikellijst';
$result=ibase_query($tr, $query);
while ($row=ibase_fetch_assoc($result))
echo $row['TITEL']. '<br />';
ibase_commit($tr);
---------

As I understand it, this transaction should never get a deadlock
because of IBASE_READ+IBASE_COMMITTED.
But it does....

if I make a not-committed update to the table, after ibase_trans,
before ibase_query, the error occurs during the ibase_fetch_assoc.

I have no clue.

I use php5.1, FB1.5.

Could someone bring the light?


Regards,

Kjeld Loozen