2 DRCP: oci_pconnect() with scope end when oci8.old_oci_close_semantics ON
4 <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
6 oci8.old_oci_close_semantics=1
10 require dirname(__FILE__)."/drcp_functions.inc";
11 require dirname(__FILE__)."/details.inc";
13 // The test opens a connection within function1 and updates a table
14 // (without committing). Another connection is opened from function
15 // 2, and the table queried. When function1 ends, the connection from
16 // function1 is not closed, so the updated value will be seen in
17 // function2. Also the table can't be dropped because an uncommitted
18 // transaction exists.
21 $c = oci_new_connect($user,$password,$dbase);
23 drcp_create_table($c);
25 echo "This is with a OCI_PCONNECT\n";
26 function1($user,$password,$dbase);
28 // Should return the OLD value
29 function2($user,$password,$dbase);
31 // This is the first scope for the script
33 function function1($user,$password,$dbase)
35 var_dump($c = oci_pconnect($user,$password,$dbase));
36 drcp_update_table($c);
39 // This is the second scope
41 function function2($user,$password,$dbase)
43 var_dump($c = oci_pconnect($user,$password,$dbase));
44 drcp_select_value($c);
54 This is with a OCI_PCONNECT
55 resource(%d) of type (oci8 persistent connection)
56 Update done-- DEPT value has been set to NEWDEPT
57 resource(%d) of type (oci8 persistent connection)
58 The value of DEPT for id 105 is NEWDEPT
60 Warning: oci_execute(): ORA-00054: %s