fix indentation
This commit is contained in:
parent
20c4fe69c1
commit
8f67221e18
|
@ -695,20 +695,20 @@ zend_long pdo_sqlsrv_dbh_do( pdo_dbh_t *dbh, const char *sql, size_t sql_len TSR
|
|||
// since the user can give us a compound statement, we return the row count for the last set, and since the row count
|
||||
// isn't guaranteed to be valid until all the results have been fetched, we fetch them all first.
|
||||
|
||||
if ( execReturn ) {
|
||||
if ( execReturn != SQL_NO_DATA && core_sqlsrv_has_any_result( driver_stmt TSRMLS_CC )) {
|
||||
if ( execReturn ) {
|
||||
if ( execReturn != SQL_NO_DATA && core_sqlsrv_has_any_result( driver_stmt TSRMLS_CC )) {
|
||||
|
||||
SQLRETURN r = SQL_SUCCESS;
|
||||
SQLRETURN r = SQL_SUCCESS;
|
||||
|
||||
do {
|
||||
do {
|
||||
|
||||
rows = core::SQLRowCount( driver_stmt TSRMLS_CC );
|
||||
rows = core::SQLRowCount( driver_stmt TSRMLS_CC );
|
||||
|
||||
r = core::SQLMoreResults( driver_stmt TSRMLS_CC );
|
||||
r = core::SQLMoreResults( driver_stmt TSRMLS_CC );
|
||||
|
||||
} while ( r != SQL_NO_DATA );
|
||||
}
|
||||
}
|
||||
} while ( r != SQL_NO_DATA );
|
||||
}
|
||||
}
|
||||
|
||||
// returning -1 forces PDO to return false, which signals an error occurred. SQLRowCount returns -1 for a number of cases
|
||||
// naturally, so we override that here with no rows returned.
|
||||
|
|
|
@ -554,18 +554,18 @@ int pdo_sqlsrv_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
|
|||
|
||||
SQLRETURN execReturn = core_sqlsrv_execute( driver_stmt TSRMLS_CC, query, query_len );
|
||||
|
||||
if ( execReturn ) {
|
||||
if ( execReturn == SQL_NO_DATA ) {
|
||||
stmt->column_count = 0;
|
||||
stmt->row_count = 0;
|
||||
}
|
||||
else {
|
||||
stmt->column_count = core::SQLNumResultCols( driver_stmt TSRMLS_CC );
|
||||
if ( execReturn ) {
|
||||
if ( execReturn == SQL_NO_DATA ) {
|
||||
stmt->column_count = 0;
|
||||
stmt->row_count = 0;
|
||||
}
|
||||
else {
|
||||
stmt->column_count = core::SQLNumResultCols( driver_stmt TSRMLS_CC );
|
||||
|
||||
// return the row count regardless if there are any rows or not
|
||||
stmt->row_count = core::SQLRowCount( driver_stmt TSRMLS_CC );
|
||||
}
|
||||
}
|
||||
// return the row count regardless if there are any rows or not
|
||||
stmt->row_count = core::SQLRowCount( driver_stmt TSRMLS_CC );
|
||||
}
|
||||
}
|
||||
|
||||
// workaround for a bug in the PDO driver manager. It is fairly simple to crash the PDO driver manager with
|
||||
// the following sequence:
|
||||
|
|
Loading…
Reference in a new issue