Subject Use readonly transactions
Author ck1625
Hi,

I don't succeed that my transactions are readonly. I run the following script:

$conn = ibase_pconnect('BSFBTEST:swimranking_raw', 'SYSDBA', 'masterkey', '');
$tran = ibase_trans($conn, IBASE_READ + IBASE_COMMITTED + IBASE_REC_NO_VERSION + IBASE_NOWAIT);
$qry = ibase_query($tran, 'select first 10 * from RAW_MEET');

while ( $row = ibase_fetch_assoc($qry, IBASE_FETCH_BLOBS) ) {
var_dump($row);
echo '<hr>';
}

ibase_free_query($qry);
ibase_commit($tran);
ibase_close($conn);


On the line of ibase_free_query I get an error (supplied resource is not a valid Firebird/InterBase query resource).

And when I look at the Firebird log it says this:
- I can see, that the statement isn't freeed before I call it the next time
- The transaction has not the correct parameters.

What is wrong? Or is it just Firebird / PHP / Windows that doesn't work?

cu Christian


2013-03-08T17:32:15.7540 (2660:014ED3A4) FREE_STATEMENT
swimranking_raw (ATT_79, SYSDBA:NONE, TCPv4:192.168.10.31)
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe:2412

Statement 90:
-------------------------------------------------------------------------------
select first 9 * from RAW_MEET where not COMMENT is null
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RAW_MEET NATURAL)

2013-03-08T17:32:15.7540 (2660:014ED3A4) START_TRANSACTION
swimranking_raw (ATT_79, SYSDBA:NONE, TCPv4:192.168.10.31)
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe:2412
(TRA_3213, CONCURRENCY | WAIT | READ_WRITE)

2013-03-08T17:32:15.7540 (2660:014ED3A4) PREPARE_STATEMENT
swimranking_raw (ATT_79, SYSDBA:NONE, TCPv4:192.168.10.31)
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe:2412
(TRA_3213, CONCURRENCY | WAIT | READ_WRITE)

Statement 91:
-------------------------------------------------------------------------------
select first 9 * from RAW_MEET where not COMMENT is null
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RAW_MEET NATURAL)
0 ms

2013-03-08T17:32:15.7540 (2660:014ED3A4) EXECUTE_STATEMENT_START
swimranking_raw (ATT_79, SYSDBA:NONE, TCPv4:192.168.10.31)
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe:2412
(TRA_3213, CONCURRENCY | WAIT | READ_WRITE)

Statement 91:
-------------------------------------------------------------------------------
select first 9 * from RAW_MEET where not COMMENT is null
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RAW_MEET NATURAL)

2013-03-08T17:32:15.7540 (2660:014ED3A4) EXECUTE_STATEMENT_FINISH
swimranking_raw (ATT_79, SYSDBA:NONE, TCPv4:192.168.10.31)
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe:2412
(TRA_3213, CONCURRENCY | WAIT | READ_WRITE)

Statement 91:
-------------------------------------------------------------------------------
select first 9 * from RAW_MEET where not COMMENT is null
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RAW_MEET NATURAL)
2 records fetched
5 ms, 4427 fetch(es)

Table Natural Index Update Insert Delete Backout Purge Expunge
***************************************************************************************************************
RAW_MEET 2167

2013-03-08T17:32:15.7540 (2660:014ED3A4) COMMIT_TRANSACTION
swimranking_raw (ATT_79, SYSDBA:NONE, TCPv4:192.168.10.31)
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe:2412
(TRA_3213, CONCURRENCY | WAIT | READ_WRITE)
0 ms, 1 read(s), 1 write(s), 1 fetch(es), 1 mark(s)

2013-03-08T17:32:15.7540 (2660:014ED3A4) CLOSE_CURSOR
swimranking_raw (ATT_79, SYSDBA:NONE, TCPv4:192.168.10.31)
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe:2412

Statement 91:
-------------------------------------------------------------------------------
select first 9 * from RAW_MEET where not COMMENT is null
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PLAN (RAW_MEET NATURAL)