diff options
author | Christopher Jones <christopher.jones@oracle.com> | 2018-12-09 12:38:35 +1100 |
---|---|---|
committer | Christopher Jones <christopher.jones@oracle.com> | 2018-12-09 12:38:35 +1100 |
commit | e2ecd60f2f080d10d38337912b793a7a6b5609e0 (patch) | |
tree | 6bcbb6d233fadcc8b328ae0fe9522a230b6931e3 | |
parent | 4246702406cb2dbbdb66bd84985ebfc72976569f (diff) | |
download | php-git-e2ecd60f2f080d10d38337912b793a7a6b5609e0.tar.gz |
Upgrade internal OCI call
-rw-r--r-- | ext/oci8/oci8_statement.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index b4e5118f9c..9956054fdf 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -262,7 +262,11 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows) zend_hash_apply(statement->columns, php_oci_cleanup_pre_fetch); } +#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2))) + PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch2, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, 0, OCI_DEFAULT)); +#else PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT)); +#endif if (errstatus == OCI_NO_DATA || nrows == 0) { if (statement->last_query == NULL) { @@ -338,7 +342,11 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows) } } +#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2))) + PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch2, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, 0, OCI_DEFAULT)); +#else PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT)); +#endif if (piecewisecols) { for (i = 0; i < statement->ncolumns; i++) { |