php-src/ext/oci8/tests/debug.phpt
Christopher Jones 2769ae0444 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
2009-10-06 22:36:32 +00:00

72 lines
2.1 KiB
PHP

--TEST--
oci_internal_debug()
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => (11\.2|12\.)/', $phpinfo);
if ($iv !== 1) {
die ("skip expected output only valid when using Oracle 11gR2+ client libraries");
}
?>
--FILE--
<?php
require(dirname(__FILE__)."/details.inc");
oci_internal_debug(true);
if (!empty($dbase)) {
oci_connect($user, $password, $dbase);
}
else {
oci_connect($user, $password);
}
echo "Done\n";
?>
--EXPECTF--
OCI8 DEBUG: OCINlsEnvironmentVariableGet at (%s:%d)
OCI8 DEBUG L1: Got NO cached connection at (%s:%d)
OCI8 DEBUG: OCIEnvNlsCreate at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCISessionPoolCreate at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG L1: create_spool: (%s:%d)
OCI8 DEBUG L1: using shared pool: (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG L1: (numopen=0)(numbusy=0) at (%s:%d)
OCI8 DEBUG: OCISessionGet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG: OCIContextGetValue at (%s:%d)
OCI8 DEBUG: OCIContextGetValue at (%s:%d)
OCI8 DEBUG: OCIMemoryAlloc at (%s:%d)
OCI8 DEBUG: OCIContextSetValue at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG L1: New Non-Persistent Connection address: (%s) at (%s:%d)
OCI8 DEBUG L1: num_persistent=(%s:%d)
OCI8 DEBUG: OCISessionRelease at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
Done
OCI8 DEBUG: OCISessionPoolDestroy at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)