Subject | transaction question |
---|---|
Author | KjeldLoozen |
Post date | 2006-02-01T13:06:57Z |
Dear members,
I apologize in advance for crossposting, I asked this question
already in the FB-PHP list, without results. But the topic is realy
a FB one, so I hope you quys can help me out....
As I understand it, (after reading Helen's FB bible) a transaction
started with
IBASE_READ+IBASE_COMMITTED should never ge a deadlock condition,
right?
Well, in my PHP script, I start a simple select query just to get
the results from a table. I step through the code (Zend studio), let
a read transaction start.
Meanwhile I update a record (in another program (IBexpert) but i do
not commit that
transaction (in IBexpert)
In zend Ì run the query(the was transaction already started). But:
error: lock conflict on no wait
transaction deadlock
If I commit the record-change in IBExpert, and after that I execute
the select query in Zend, there's no problem.
How can this be????
This is the code, sorry for php:
---------
$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,using another program,
after ibase_trans,before ibase_query, the error occurs during the
ibase_fetch_assoc.
Any help very much appreciated!
Regards,
Kjeld Loozen
I apologize in advance for crossposting, I asked this question
already in the FB-PHP list, without results. But the topic is realy
a FB one, so I hope you quys can help me out....
As I understand it, (after reading Helen's FB bible) a transaction
started with
IBASE_READ+IBASE_COMMITTED should never ge a deadlock condition,
right?
Well, in my PHP script, I start a simple select query just to get
the results from a table. I step through the code (Zend studio), let
a read transaction start.
Meanwhile I update a record (in another program (IBexpert) but i do
not commit that
transaction (in IBexpert)
In zend Ì run the query(the was transaction already started). But:
error: lock conflict on no wait
transaction deadlock
If I commit the record-change in IBExpert, and after that I execute
the select query in Zend, there's no problem.
How can this be????
This is the code, sorry for php:
---------
$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,using another program,
after ibase_trans,before ibase_query, the error occurs during the
ibase_fetch_assoc.
Any help very much appreciated!
Regards,
Kjeld Loozen