diff options
| author | Christopher Jones <sixd@php.net> | 2013-07-26 13:34:45 -0700 |
|---|---|---|
| committer | Christopher Jones <sixd@php.net> | 2013-07-26 13:34:45 -0700 |
| commit | 85b66e9e2184eda9f2882684b5e8d7cfe3b348ce (patch) | |
| tree | 43fdffd6257420e2b567be6f7933ada17406f6b9 /ext/oci8/oci8_interface.c | |
| parent | fc410f6ecec9b4b096cf44ea1f86354e258da67c (diff) | |
| download | php-git-85b66e9e2184eda9f2882684b5e8d7cfe3b348ce.tar.gz | |
OCI8 extension: Allow Implicit Result Set statement resources to inherit the parent's current prefetch count
Diffstat (limited to 'ext/oci8/oci8_interface.c')
| -rw-r--r-- | ext/oci8/oci8_interface.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index 483ddcf75f..70ec4b5093 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -1744,7 +1744,12 @@ PHP_FUNCTION(oci_set_prefetch) PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); - if (php_oci_statement_set_prefetch(statement, size TSRMLS_CC)) { + if (size < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of rows to be prefetched has to be greater than or equal to 0"); + return; + } + + if (php_oci_statement_set_prefetch(statement, (ub4)size TSRMLS_CC)) { RETURN_FALSE; } RETURN_TRUE; |
