Annotation of embedaddon/php/ext/oci8/tests/drcp_pconn_close2.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: DRCP: oci_pconnect() with oci_close() and oci8.old_oci_close_semantics OFF
3: --SKIPIF--
4: <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
5: --INI--
6: oci8.old_oci_close_semantics=0
7: oci8.connection_class=test
8: --FILE--
9: <?php
10:
11: require dirname(__FILE__)."/details.inc";
12:
13: // Test will open a persistent connection
14: // Close the connection
15: // Open another connection
16: // With oci_close() the connection is released to the pool and hence the
17: // the second connection will be different
18:
19:
20: echo "This is with a OCI_PCONNECT\n";
21: var_dump($conn1 = oci_pconnect($user,$password,$dbase));
22: $rn1 = (int)$conn1;
23: oci_close($conn1);
24:
25: // Query for the row updated. The new value should be returned
26:
27: var_dump($conn2 = oci_pconnect($user,$password,$dbase));
28: $rn2 = (int)$conn2;
29: oci_close($conn2);
30:
31: // Compare the resource numbers
32:
33: if ($rn1 === $rn2)
34: echo "Both connections share a resource : NOT OK \n";
35: else
36: echo "Both connections are different : OK \n";
37:
38: echo "Done\n";
39:
40: ?>
41: --EXPECTF--
42: This is with a OCI_PCONNECT
43: resource(%d) of type (oci8 persistent connection)
44: resource(%d) of type (oci8 persistent connection)
45: Both connections are different : OK
46: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>