summaryrefslogtreecommitdiff
path: root/ext/oci8/php_oci8_int.h
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2008-04-18 00:05:27 +0000
committerChristopher Jones <sixd@php.net>2008-04-18 00:05:27 +0000
commit08eaa56798fba86a72a34e0919d2ce3511c544cb (patch)
tree6ed613484bad6429997406bea1d85a79eb00df73 /ext/oci8/php_oci8_int.h
parentde34e8700029fc2d380c485e98401829da9b4d6c (diff)
downloadphp-git-08eaa56798fba86a72a34e0919d2ce3511c544cb.tar.gz
MFH
Code: - Do scope-end release for oci_pconnect (oci8.old_oci_close_semantics=1 gives old behavior) - Fix session reuse with 10.2 client libs - Fix the Ping macro version check for 10.2 - Add type check associated with zend_list_find - Code connection re-organized for reuse - Format comments - WS changes - Prepare for new PECL release Tests: - Add new tests - Rationalize password tests - Revert use of __DIR__ so tests will work with PHP 5.2 - Update some skipifs to make tests more portable
Diffstat (limited to 'ext/oci8/php_oci8_int.h')
-rw-r--r--ext/oci8/php_oci8_int.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index 2331f08fa9..13e3149c4f 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -257,13 +257,22 @@ typedef struct { /* php_oci_out_column {{{ */
OCI_G(in_call) = 0; \
} while (0)
+/* Check for errors that indicate the connection to the DB is no
+ * longer valid. If it isn't, then the PHP connection is marked to be
+ * reopened by the next PHP OCI8 connect command. This is most useful
+ * for persistent connections. The error number list is not
+ * exclusive. The error number comparisons and the
+ * OCI_ATTR_SERVER_STATUS check are done for maximum cross-version
+ * compatibility. In the far future, only the attribute check will be
+ * needed.
+ */
#define PHP_OCI_HANDLE_ERROR(connection, errcode) \
do { \
switch (errcode) { \
case 1013: \
zend_bailout(); \
break; \
- case 22: \
+ case 22: \
case 378: \
case 602: \
case 603: \
@@ -286,7 +295,7 @@ typedef struct { /* php_oci_out_column {{{ */
(connection)->is_open = 0; \
break; \
default: \
- { /* do both numeric checks (above) and the status check for maximum version compatibility */ \
+ { \
ub4 serverStatus = OCI_SERVER_NORMAL; \
PHP_OCI_CALL(OCIAttrGet, ((dvoid *)(connection)->server, OCI_HTYPE_SERVER, (dvoid *)&serverStatus, \
(ub4 *)0, OCI_ATTR_SERVER_STATUS, (connection)->err)); \
@@ -461,7 +470,6 @@ ZEND_BEGIN_MODULE_GLOBALS(oci) /* {{{ */
zend_bool old_oci_close_semantics; /* old_oci_close_semantics flag (to determine the way oci_close() should behave) */
int shutdown; /* in shutdown flag */
- int request_shutdown; /* in request shutdown flag */
OCIEnv *env; /* global environment handle */