mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed pdo_firebird_handle_factory to check ret when starting a transaction (#17632)
Changed to not execute php_firebird_begin_transaction if transaction cannot be started successfully Closes #17632
This commit is contained in:
parent
6717947ffe
commit
e96a35b9a8
1 changed files with 2 additions and 2 deletions
|
@ -684,7 +684,7 @@ static bool firebird_handle_preparer(pdo_dbh_t *dbh, zend_string *sql, /* {{{ */
|
||||||
|
|
||||||
/* make all parameters nullable */
|
/* make all parameters nullable */
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
XSQLVAR* var;
|
XSQLVAR* var;
|
||||||
for (i = 0, var = S->in_sqlda->sqlvar; i < S->in_sqlda->sqld; i++, var++) {
|
for (i = 0, var = S->in_sqlda->sqlvar; i < S->in_sqlda->sqld; i++, var++) {
|
||||||
/* The low bit of sqltype indicates that the parameter can take a NULL value */
|
/* The low bit of sqltype indicates that the parameter can take a NULL value */
|
||||||
var->sqltype |= 1;
|
var->sqltype |= 1;
|
||||||
|
@ -1431,7 +1431,7 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /*
|
||||||
"HY000", H->isc_status[1], errmsg);
|
"HY000", H->isc_status[1], errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbh->auto_commit && !H->tr) {
|
if (ret && dbh->auto_commit && !H->tr) {
|
||||||
ret = php_firebird_begin_transaction(dbh, /* auto commit mode */ true);
|
ret = php_firebird_begin_transaction(dbh, /* auto commit mode */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue