php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62241 PDO_Firebird
Submitted: 2012-06-06 09:12 UTC Modified: 2012-06-08 09:07 UTC
From: mr dot efrem at gmail dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.3.13 OS: Independ
Private report: No CVE-ID: None
 [2012-06-06 09:12 UTC] 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?



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-07 17:01 UTC] felipe@php.net
-Status: Open +Status: Not a bug
 [2012-06-07 17:01 UTC] felipe@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-08 09:07 UTC] mr dot efrem at gmail dot com
Please realize this functional
 [2013-05-31 15:14 UTC] 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
 [2013-05-31 15:26 UTC] slavb18 at gmail dot com
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 16:01:31 2024 UTC