mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Added support for Shared Data Mode for OCI8_VERSION >= 8.1, which will provide memory savings by sharing common statement data
This commit is contained in:
parent
0c80cc9d20
commit
beb7476ba9
2 changed files with 14 additions and 0 deletions
|
@ -74,6 +74,7 @@ if test "$PHP_OCI8" != "no"; then
|
|||
PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
|
||||
AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])
|
||||
AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ])
|
||||
;;
|
||||
|
||||
9.0)
|
||||
|
@ -84,6 +85,7 @@ if test "$PHP_OCI8" != "no"; then
|
|||
PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
|
||||
AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])
|
||||
AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ])
|
||||
AC_DEFINE(HAVE_OCI9,1,[ ])
|
||||
;;
|
||||
|
||||
|
|
|
@ -464,12 +464,24 @@ PHP_MINIT_FUNCTION(oci)
|
|||
zend_class_entry oci_coll_class_entry;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OCI8_SHARED_MODE
|
||||
|
||||
#ifdef WITH_COLLECTIONS
|
||||
#define PHP_OCI_INIT_MODE OCI_SHARED | OCI_OBJECT
|
||||
#else
|
||||
#define PHP_OCI_INIT_MODE OCI_SHARED
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef WITH_COLLECTIONS
|
||||
#define PHP_OCI_INIT_MODE OCI_DEFAULT | OCI_OBJECT
|
||||
#else
|
||||
#define PHP_OCI_INIT_MODE OCI_DEFAULT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if OCI_USE_EMALLOC
|
||||
OCIInitialize(PHP_OCI_INIT_MODE, NULL, ocimalloc, ocirealloc, ocifree);
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue