summaryrefslogtreecommitdiff
path: root/ext/oci8/php_oci8_int.h
diff options
context:
space:
mode:
authorKoenigsKind <git@koenigskind.net>2017-04-07 20:40:40 +0200
committerChristopher Jones <christopher.jones@oracle.com>2017-06-20 14:32:52 +1000
commit1b797f7ad3da798827806012abd3fd2641c1bc14 (patch)
tree78f72e039d8abd4177245beb106971f3265c30fa /ext/oci8/php_oci8_int.h
parenta6c67a088a6e1bd249b215a7d0a6536e5fa8c3ce (diff)
downloadphp-git-1b797f7ad3da798827806012abd3fd2641c1bc14.tar.gz
oci8 - Implementation of Oracle TAF Callback
Adds support for the Transparent Application Failover Callback. The php_oci_connection struct got a char* added which will contain the callback function, it should be set to PHP_OCI_TAF_DISABLE_CALLBACK at the end of a php request for permanent connections so that, if a TAF callback occurs, no userspace function will be called. Maybe add support for registering object functions (via array), currently the register function only accepts a string. I didn't know how to implement it correctly. As a failover occurs very rarely it might be better to not keep the cache when saving the zend_fcall_info. Things to do [ ] config.m4 needs to compile oci8_failover.c [ ] Check if correctly implemented (especially for multithreading) [ ] Add support for registering callback function via array
Diffstat (limited to 'ext/oci8/php_oci8_int.h')
-rw-r--r--ext/oci8/php_oci8_int.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index 61bb2750fa..06a88f4c84 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -164,6 +164,8 @@ typedef struct {
#ifdef HAVE_OCI8_DTRACE
char *client_id; /* The oci_set_client_identifier() value */
#endif
+
+ zval taf_callback; /* The Oracle TAF callback function in the userspace */
} php_oci_connection;
/* }}} */
@@ -531,6 +533,13 @@ ZEND_BEGIN_MODULE_GLOBALS(oci) /* {{{ Module globals */
char *edition;
ZEND_END_MODULE_GLOBALS(oci) /* }}} */
+/* {{{ transparent failover related prototypes */
+
+int php_oci_register_taf_callback(php_oci_connection *connection, zval *callback);
+int php_oci_disable_taf_callback(php_oci_connection *connection);
+
+/* }}} */
+
#ifdef ZTS
#define OCI_G(v) TSRMG(oci_globals_id, zend_oci_globals *, v)
#else