Edit report at https://bugs.php.net/bug.php?id=62241&edit=1

 ID:                 62241
 Comment by:         slavb18 at gmail dot com
 Reported by:        mr dot efrem at gmail dot com
 Summary:            PDO_Firebird
 Status:             Not a bug
 Type:               Bug
 Package:            PDO related
 Operating System:   Independ
 PHP Version:        5.3.13
 Block user comment: N
 Private report:     N

 New Comment:

I think java-style transctions params is better way, but this requires changes 
in  pdo extension - pdo should declare functions 
setTransactionIsolation, getTransactionIsolation, setReadOnly, isReadOnly, (and 
some for wait/no wait???) - like ones in 
http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html


Previous Comments:
------------------------------------------------------------------------
[2013-05-31 15:14:06] slavb18 at gmail dot com

If anybody of pdo maintainers reads this, how should we realize this functional?

1. jdbc-way
pdo extension declare constants PDO_TRANS_XXX (like commented out in file 
ext/pdo_firebird/firebird_driver.c)

and then pdo_firebird translate them into firebird transaction params

2. interbase extension way
pdo_firebird export his own constants for firebird transaction params

------------------------------------------------------------------------
[2012-06-08 09:07:07] mr dot efrem at gmail dot com

Please realize this functional

------------------------------------------------------------------------
[2012-06-07 17:01:19] fel...@php.net

Actually there is no way to set, and such code you have seen isn't executed at 
all, it's surrounded by '#if abies_0 ... #endif'. Probably it was a planned 
feature, but not implemented yet.

------------------------------------------------------------------------
[2012-06-06 09:12:17] mr dot efrem at gmail dot com

Description:
------------
How set isolation level and options for firebird transactions?

Test script:
---------------
I see in ext/pdo_firebird/firebird_driver.c this code:

/* called by PDO to start a transaction */                                      
                                                                            
static int firebird_handle_begin(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */            
                                                                  ....          
                                                  
        if (dbh->transaction_flags & PDO_TRANS_ISOLATION_LEVEL) {               
                                                                             
                if (dbh->transaction_flags & PDO_TRANS_READ_UNCOMMITTED) {      
                                                                             
                        /* this is a poor fit, but it's all we have */          
                                                                             
                        *ptpb++ = isc_tpb_read_committed;                       
                                                                             
                        *ptpb++ = isc_tpb_rec_version;                          
                                                                             
...                        


How and where to send the flags PDO_TRANS_READ_COMMITTED, PDO_TRANS_READWRITE, 
PDO_TRANS_ABORT, ... at the opening of the transaction functions PDO?




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62241&edit=1

Reply via email to