summaryrefslogtreecommitdiff
path: root/ext/oci8/php_oci8_int.h
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2009-10-06 22:36:32 +0000
committerChristopher Jones <sixd@php.net>2009-10-06 22:36:32 +0000
commit2769ae044457f19c2adf899f6f159087e60d1af9 (patch)
treee0b3e33b2656d5f60f5b72ee39c23822ee49142e /ext/oci8/php_oci8_int.h
parentef2b799a28f1fe94874726935e14b961aaaf74b0 (diff)
downloadphp-git-2769ae044457f19c2adf899f6f159087e60d1af9.tar.gz
1. Introduce connection attribute functions:
oci_set_module_name oci_set_action oci_set_client_info oci_set_client_identifier These functions set values that are visible and used by the database. They aid tracing, authentication and auditing. 2. Introduce connection attribute function: oci_set_edition Oracle 11g R2 "editions" allow multiple versions of DB objects to exist at one time. By setting different editions, two different versions of an application can run concurrently, making upgrades or A/B testing easier. 3. Introduce OCI_NO_AUTO_COMMIT as an alias for the OCI_DEFAULT constant (which is not the default value) used by oci_execute(). 4. Allow the oci_set_prefetch value to be 0. This is important in some cases using REF CURSORS in Oracle 11gR2. 5. Set the DRIVER_NAME attribute of Oracle Database 11gR2 connections to aid application tracing. The value used is to "PHP OCI8" followed by the OCI8 version number. Note the version number may get truncated in DB views such as v$session_connect_info. 6. Generate an error if an invalid resource type is used in oci_bind_by_name [DOC] Documentation will be added for the changes
Diffstat (limited to 'ext/oci8/php_oci8_int.h')
-rw-r--r--ext/oci8/php_oci8_int.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index 636191f46e..04e797c6e4 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -101,6 +101,12 @@ extern zend_class_entry *oci_coll_class_entry_ptr;
#error Invalid value for PHP_OCI_CRED_EXT
#endif
+/*
+ * Name passed to Oracle for tracing. Note some DB views only show
+ * the first nine characters of the driver name.
+ */
+#define PHP_OCI8_DRIVER_NAME "PHP OCI8 " PHP_OCI8_VERSION
+
/* }}} */
typedef struct { /* php_oci_spool {{{ */
@@ -200,6 +206,7 @@ typedef struct { /* php_oci_bind {{{ */
dvoid *descriptor; /* used for binding of LOBS etc */
OCIStmt *statement; /* used for binding REFCURSORs */
php_oci_statement *parent_statement; /* pointer to the parent statement */
+ ub2 type; /* bind type */
struct {
void *elements;
sb2 *indicators;
@@ -439,7 +446,7 @@ php_oci_out_column * php_oci_statement_get_column (php_oci_statement *, long, ch
int php_oci_statement_execute (php_oci_statement *, ub4 TSRMLS_DC);
int php_oci_statement_cancel (php_oci_statement * TSRMLS_DC);
void php_oci_statement_free (php_oci_statement * TSRMLS_DC);
-int php_oci_bind_pre_exec(void *data TSRMLS_DC);
+int php_oci_bind_pre_exec(void *data, void *result TSRMLS_DC);
int php_oci_bind_post_exec(void *data TSRMLS_DC);
int php_oci_bind_by_name(php_oci_statement *, char *, int, zval*, long, ub2 TSRMLS_DC);
sb4 php_oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 *, ub1 *, dvoid **);
@@ -480,6 +487,7 @@ ZEND_BEGIN_MODULE_GLOBALS(oci) /* {{{ */
zend_bool in_call;
char *connection_class;
zend_bool events;
+ char *edition;
ZEND_END_MODULE_GLOBALS(oci) /* }}} */
#ifdef ZTS