Permalink
Browse files

Merge branch 'PHP-5.6'

* PHP-5.6:
  Fixed Bug #66875 (Improve performance of multi-row OCI_RETURN_LOB queries)
  • Loading branch information...
cjbj committed Mar 10, 2014
2 parents cfe1a63 + 601367e commit de4ff2c5a42980645baf731200840c56d6a75275
Showing with 28 additions and 6 deletions.
  1. +4 −0 ext/oci8/oci8.c
  2. +1 −0 ext/oci8/oci8_lob.c
  3. +1 −0 ext/oci8/oci8_statement.c
  4. +20 −5 ext/oci8/package.xml
  5. +1 −1 ext/oci8/php_oci8.h
  6. +1 −0 ext/oci8/php_oci8_int.h
View
@@ -2578,7 +2578,11 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode TSR
if (column->data_type != SQLT_RDD && (mode & PHP_OCI_RETURN_LOBS)) {
/* PHP_OCI_RETURN_LOBS means that we want the content of the LOB back instead of the locator */
+ if (column->chunk_size)
+ descriptor->chunk_size = column->chunk_size;
lob_fetch_status = php_oci_lob_read(descriptor, -1, 0, &lob_buffer, &lob_length TSRMLS_CC);
+ if (descriptor->chunk_size) /* Cache the chunk_size to avoid recalling OCILobGetChunkSize */
+ column->chunk_size = descriptor->chunk_size;
php_oci_temp_lob_close(descriptor TSRMLS_CC);
if (lob_fetch_status) {
ZVAL_FALSE(value);
View
@@ -92,6 +92,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, long typ
descriptor->charset_form = SQLCS_IMPLICIT; /* default value */
descriptor->charset_id = connection->charset;
descriptor->is_open = 0;
+ descriptor->chunk_size = 0;
if (descriptor->type == OCI_DTYPE_LOB || descriptor->type == OCI_DTYPE_FILE) {
/* add Lobs & Files to hash. we'll flush them at the end */
@@ -713,6 +713,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
outcol->is_descr = 1;
outcol->statement->has_descr = 1;
outcol->storage_size4 = -1;
+ outcol->chunk_size = 0;
dynamic = OCI_DYNAMIC_FETCH;
break;
View
@@ -45,21 +45,20 @@ libraries are available.
<active>no</active>
</lead>
- <date>2014-02-10</date>
+ <date>2014-03-11</date>
<time>12:00:00</time>
<version>
- <release>2.0.7</release>
- <api>2.0.7</api>
+ <release>2.0.8</release>
+ <api>2.0.8</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
-Added oci_bind_by_name() support for PL/SQL BOOLEAN type
-Build change: Fix source variable definition for C89 compatibility
+Enhancement - Improve performance of multi-row OCI_RETURN_LOB queries (Bug #66875)
</notes>
<contents>
<dir name="/">
@@ -462,6 +461,22 @@ Build change: Fix source variable definition for C89 compatibility
</extsrcrelease>
<changelog>
+<release>
+ <version>
+ <release>2.0.7</release>
+ <api>2.0.7</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Added oci_bind_by_name() support for PL/SQL BOOLEAN type
+Build change: Fix source variable definition for C89 compatibility
+ </notes>
+</release>
+
<release>
<version>
<release>2.0.6</release>
View
@@ -45,7 +45,7 @@
*/
#undef PHP_OCI8_VERSION
#endif
-#define PHP_OCI8_VERSION "2.0.7"
+#define PHP_OCI8_VERSION "2.0.8"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
View
@@ -283,6 +283,7 @@ typedef struct {
sb2 precision; /* column precision */
ub1 charset_form; /* charset form, required for NCLOBs */
ub2 charset_id; /* charset ID */
+ ub4 chunk_size; /* LOB chunk size */
} php_oci_out_column;
/* }}} */

0 comments on commit de4ff2c

Please sign in to comment.