Delete two obsolete .phpt's.
<active>no</active>
</lead>
- <date>2013-10-08</date>
+ <date>2013-10-17</date>
<time>12:00:00</time>
<version>
<api>2.0.5</api>
</version>
<stability>
- <release>devel</release>
- <api>devel</api>
+ <release>stable</release>
+ <api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
<file name="bug42841.phpt" role="test" />
<file name="bug43492_2.phpt" role="test" />
<file name="bug43492.phpt" role="test" />
- <file name="bug43497_92.phpt" role="test" />
<file name="bug43497.phpt" role="test" />
<file name="bug44008.phpt" role="test" />
<file name="bug44113.phpt" role="test" />
<file name="bug51253.phpt" role="test" />
<file name="bug51291_1.phpt" role="test" />
<file name="bug51291_2.phpt" role="test" />
- <file name="clientversion_92.phpt" role="test" />
<file name="clientversion.phpt" role="test" />
<file name="close.phpt" role="test" />
<file name="coll_001.phpt" role="test" />
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] >= 2) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
- ))) {
- die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
-}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 11) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+if (!(isset($matches[0]) && $matches[1] >= 12)) {
+ die("skip expected output only valid when using Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 11 && $matches[2] == 1) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
- ))) {
- die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
+if (!(isset($matches[0]) && $matches[1] < 12)) {
+ die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] >= 2) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
- ))) {
- die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
-}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 11) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+if (!(isset($matches[0]) && $matches[1] >= 12)) {
+ die("skip expected output only valid when using Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 11 && $matches[2] == 1) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
- ))) {
- die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
+if (!(isset($matches[0]) && $matches[1] < 12)) {
+ die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] >= 2) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
- ))) {
- die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
-}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 11) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+if (!(isset($matches[0]) && $matches[1] >= 12)) {
+ die("skip expected output only valid when using Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 11 && $matches[2] == 1) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
- ))) {
- die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
+if (!(isset($matches[0]) && $matches[1] < 12)) {
+ die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] >= 2) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
- ))) {
- die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
-}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 11) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+if (!(isset($matches[0]) && $matches[1] >= 12)) {
+ die("skip expected output only valid when using Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 11 && $matches[2] == 1) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
- ))) {
- die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
+if (!(isset($matches[0]) && $matches[1] < 12)) {
+ die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
--ENV--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
-if (preg_match('/^1[012]\./', oci_client_version()) != 1) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
-if (preg_match('/^1[012]\./', oci_client_version()) != 1) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--INI--
precision = 14
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
-if (preg_match('/^1[012]\./', oci_client_version()) != 1) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die ("skip expected output only valid for Oracle 10g+ clients");
-}
?>
--FILE--
<?php
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] >= 2) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
- ))) {
- die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
-}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 11) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+if (!(isset($matches[0]) && $matches[1] >= 12)) {
+ die("skip expected output only valid when using Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3) ||
- ($matches[1] == 11 && $matches[2] == 1 && $matches[3] == 0 && $matches[4] == 6) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
- ))) {
- die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
+if (!(isset($matches[0]) && $matches[1] < 12)) {
+ die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
--FILE--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
- ))) {
- die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases");
-}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 11) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+if (!(isset($matches[0]) && $matches[1] >= 12)) {
+ die("skip expected output only valid when using Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3) ||
- ($matches[1] == 11 && $matches[2] == 1 && $matches[3] == 0 && $matches[4] == 6) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
- ))) {
- die("skip expected output only valid when using specific Oracle database versions");
+if (!(isset($matches[0]) && $matches[1] < 12)) {
+ die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
--FILE--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
- ))) {
- die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases");
- // Other point releases may also work
-}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 11) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+if (!(isset($matches[0]) && $matches[1] >= 12)) {
+ die("skip expected output only valid when using Oracle 12c database");
}
?>
--ENV--
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3) ||
- ($matches[1] == 11 && $matches[2] == 1 && $matches[3] == 0 && $matches[4] == 6) ||
- ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
- ))) {
- die("skip expected output only valid when using specific Oracle database versions");
+if (!(isset($matches[0]) && $matches[1] < 12)) {
+ die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
+++ /dev/null
---TEST--
-Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory)
---SKIPIF--
-<?php
-$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
-require(dirname(__FILE__).'/skipif.inc');
-if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
-ob_start();
-phpinfo(INFO_MODULES);
-$phpinfo = ob_get_clean();
-$iv = preg_match('/Oracle .*Version => (9\.2)/', $phpinfo);
-if ($iv != 1) {
- die ("skip tests a feature that works only with Oracle 9iR2 client");
-}
-?>
---FILE--
-<?php
-
-require dirname(__FILE__).'/connect.inc';
-
-function sessionid($c) // determines and returns current session ID
-{
- $query = "select sid from v\$session where audsid = userenv('sessionid')";
-
- $stmt = oci_parse($c, $query);
-
- if (oci_execute($stmt, OCI_DEFAULT)) {
- $row = oci_fetch($stmt);
- return oci_result($stmt, 1);
- }
-
- return null;
-}
-
-
-function templobs($c, $sid) // returns number of temporary LOBs
-{
- $query = "select abstract_lobs from v\$temporary_lobs where sid = " . $sid;
-
- $stmt = oci_parse($c, $query);
-
- if (oci_execute($stmt, OCI_DEFAULT)) {
- $row = oci_fetch($stmt);
- $val = oci_result($stmt, 1);
- oci_free_statement($stmt);
- return $val;
- }
- return null;
-}
-
-
-// Read all XML data using explicit LOB locator
-function readxmltab_ex($c)
-{
- $stmt = oci_parse($c, "select extract(xml, '/').getclobval() from bug43497_tab");
-
- $cntchk = 0;
- if (oci_execute($stmt)) {
- while ($result = oci_fetch_array($stmt, OCI_NUM)) {
- $result[0]->free(); // cleanup properly
- ++$cntchk;
- }
- }
- echo "Loop count check = $cntchk\n";
-}
-
-// Read all XML data using explicit LOB locator but without freeing the temp lobs
-function readxmltab_ex_nofree($c)
-{
- $stmt = oci_parse($c, "select extract(xml, '/').getclobval() from bug43497_tab");
-
- $cntchk = 0;
- if (oci_execute($stmt)) {
- while ($result = oci_fetch_array($stmt, OCI_NUM)) {
- ++$cntchk;
- }
- }
- echo "Loop count check = $cntchk\n";
-}
-
-// Read all XML data using implicit LOB locator
-function readxmltab_im($c)
-{
- $stmt = oci_parse($c, "select extract(xml, '/').getclobval() from bug43497_tab");
-
- $cntchk = 0;
- if (oci_execute($stmt)) {
- while ($result = oci_fetch_array($stmt, OCI_NUM+OCI_RETURN_LOBS)) {
- ++$cntchk;
- }
- }
- echo "Loop count check = $cntchk\n";
-}
-
-function createxmltab($c) // create table w/ field of XML type
-{
- @dropxmltab($c);
- $stmt = oci_parse($c, "create table bug43497_tab (id number primary key, xml xmltype)");
- oci_execute($stmt);
-}
-
-function dropxmltab($c) // delete table
-{
- $stmt = oci_parse($c, "drop table bug43497_tab");
- oci_execute($stmt);
-}
-
-
-function fillxmltab($c)
-{
- for ($id = 1; $id <= 100; $id++) {
-
- // create an XML element string with random data
- $s = "<data>";
- for ($j = 0; $j < 128; $j++) {
- $s .= rand();
- }
- $s .= "</data>\n";
- for ($j = 0; $j < 4; $j++) {
- $s .= $s;
- }
- $data = "<?xml version=\"1.0\"?><records>" . $s . "</records>";
-
- // insert XML data into database
-
- $stmt = oci_parse($c, "insert into bug43497_tab(id, xml) values (:id, sys.xmltype.createxml(:xml))");
- oci_bind_by_name($stmt, ":id", $id);
- $clob = oci_new_descriptor($c, OCI_D_LOB);
- oci_bind_by_name($stmt, ":xml", $clob, -1, OCI_B_CLOB);
- $clob->writetemporary($data);
- oci_execute($stmt);
-
- $clob->close();
- $clob->free();
- }
-}
-
-
-// Initialize
-
-createxmltab($c);
-fillxmltab($c);
-
-// Run Test
-
-$sid = sessionid($c);
-
-echo "Explicit LOB use\n";
-for ($i = 1; $i <= 10; $i++) {
- echo "\nRun = " . $i . "\n";
- echo "Temporary LOBs = " . templobs($c, $sid) . "\n";
- readxmltab_ex($c);
-}
-
-echo "\nImplicit LOB use\n";
-for ($i = 1; $i <= 10; $i++) {
- echo "\nRun = " . $i . "\n";
- echo "Temporary LOBs = " . templobs($c, $sid) . "\n";
- readxmltab_im($c);
-}
-
-echo "\nExplicit LOB with no free (i.e. a temp lob leak)\n";
-for ($i = 1; $i <= 10; $i++) {
- echo "\nRun = " . $i . "\n";
- echo "Temporary LOBs = " . templobs($c, $sid) . "\n";
- readxmltab_ex_nofree($c);
-}
-
-
-
-// Cleanup
-
-dropxmltab($c);
-
-oci_close($c);
-
-echo "Done\n";
-?>
---EXPECT--
-Explicit LOB use
-
-Run = 1
-Temporary LOBs = 0
-Loop count check = 100
-
-Run = 2
-Temporary LOBs = 100
-Loop count check = 100
-
-Run = 3
-Temporary LOBs = 200
-Loop count check = 100
-
-Run = 4
-Temporary LOBs = 300
-Loop count check = 100
-
-Run = 5
-Temporary LOBs = 400
-Loop count check = 100
-
-Run = 6
-Temporary LOBs = 500
-Loop count check = 100
-
-Run = 7
-Temporary LOBs = 600
-Loop count check = 100
-
-Run = 8
-Temporary LOBs = 700
-Loop count check = 100
-
-Run = 9
-Temporary LOBs = 800
-Loop count check = 100
-
-Run = 10
-Temporary LOBs = 900
-Loop count check = 100
-
-Implicit LOB use
-
-Run = 1
-Temporary LOBs = 1000
-Loop count check = 100
-
-Run = 2
-Temporary LOBs = 1100
-Loop count check = 100
-
-Run = 3
-Temporary LOBs = 1200
-Loop count check = 100
-
-Run = 4
-Temporary LOBs = 1300
-Loop count check = 100
-
-Run = 5
-Temporary LOBs = 1400
-Loop count check = 100
-
-Run = 6
-Temporary LOBs = 1500
-Loop count check = 100
-
-Run = 7
-Temporary LOBs = 1600
-Loop count check = 100
-
-Run = 8
-Temporary LOBs = 1700
-Loop count check = 100
-
-Run = 9
-Temporary LOBs = 1800
-Loop count check = 100
-
-Run = 10
-Temporary LOBs = 1900
-Loop count check = 100
-
-Explicit LOB with no free (i.e. a temp lob leak)
-
-Run = 1
-Temporary LOBs = 2000
-Loop count check = 100
-
-Run = 2
-Temporary LOBs = 2100
-Loop count check = 100
-
-Run = 3
-Temporary LOBs = 2200
-Loop count check = 100
-
-Run = 4
-Temporary LOBs = 2300
-Loop count check = 100
-
-Run = 5
-Temporary LOBs = 2400
-Loop count check = 100
-
-Run = 6
-Temporary LOBs = 2500
-Loop count check = 100
-
-Run = 7
-Temporary LOBs = 2600
-Loop count check = 100
-
-Run = 8
-Temporary LOBs = 2700
-Loop count check = 100
-
-Run = 9
-Temporary LOBs = 2800
-Loop count check = 100
-
-Run = 10
-Temporary LOBs = 2900
-Loop count check = 100
-Done
\ No newline at end of file
require(dirname(__FILE__).'/skipif.inc');
// error3.phpt obsoletes this test for newer Oracle client versions
// Assume runtime client version is >= compile time client version
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!isset($matches[0]) ||
- ($matches[0] > 11 || ($matches[0] == 11 && $matches[1] > 2) || ($matches[0] == 11 && $matches[1] == 2 && $matches[3] >= 3)
+ ($matches[1] > 11 || ($matches[1] == 11 && $matches[2] > 2) || ($matches[1] == 11 && $matches[2] == 2 && $matches[4] >= 3)
)) {
die("skip test works only with Oracle 11.2.0.2 or earlier Oracle client libraries");
}
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
-if (preg_match('/^1[012]\./', oci_client_version()) != 1) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
+++ /dev/null
---TEST--
-oci_client_version() for Oracle 9.2 client libraries
---SKIPIF--
-<?php
-if (!extension_loaded('oci8')) die("skip no oci8 extension");
-if (preg_match('/Unknown/', oci_client_version()) != 1) {
- die("skip test expected to work only with Oracle 9gR2 client libraries");
-}
-?>
---FILE--
-<?php
-
-echo oci_client_version(), "\n";
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-Unknown
-===DONE===
if (!(isset($matches[0]) && $matches[1] >= 10)) {
die("skip expected output only valid when using Oracle 10g or greater database server");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
if (!(isset($matches[0]) && $matches[1] >= 10)) {
die("skip expected output only valid when using Oracle 10g or greater database server");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--INI--
oci8.privileged_connect = On
if (!(isset($matches[0]) && $matches[1] >= 10)) {
die("skip expected output only valid when using Oracle 10g or greater database server");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
// Bug fixed in 11.2 prevents client_info being reset
die("skip expected output only valid when using Oracle 11gR2 or greater database server");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
if (!(isset($matches[0]) && $matches[1] >= 10)) {
die("skip expected output only valid when using Oracle 10g or greater database server");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (isset($matches[0]) && $matches[0] < 10) {
- die("skip test expected to work only with Oracle 10g or greater version of client");
-}
?>
--FILE--
<?php
if ($ov !== 1) {
die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
-if (!isset($matches[0]) || !($matches[0] == 10 && $matches[0] == 2)) {
- die ("skip tests a feature that works only with Oracle 10gR2");
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!isset($matches[0]) || !($matches[1] == 10 && $matches[2] == 2)) {
+ die ("skip tests a feature that works only with Oracle 10gR2 client");
}
?>
--ENV--
if ($ov != 1) {
die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
- (($matches[0] == 11 && $matches[1] >= 2) ||
- ($matches[0] >= 12)
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
if ($ov !== 1) {
die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
-if (preg_match('/^10\.2\./', oci_client_version()) != 1) {
- die("skip test expected to work only with Oracle 10gR2 client libraries");
-}
?>
--ENV--
ORACLE_HOME=""
if ($ov !== 1) {
die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
-preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
- (($matches[0] == 11 && $matches[1] >= 2) ||
- ($matches[0] >= 12)
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
-require(dirname(__FILE__)."/details.inc");
+require(dirname(__FILE__).'/connect.inc');
if (!$test_drcp) die("skip testing DRCP connection class only works in DRCP mode");
if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user");
+
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches_sv);
+// This test in Oracle 12c needs a non-CDB or the root container
+if (isset($matches_sv[0]) && $matches_sv[1] >= 12) {
+ $s = oci_parse($c, "select nvl(sys_context('userenv', 'con_name'), 'notacdb') as dbtype from dual");
+ $r = @oci_execute($s);
+ if (!$r)
+ die('skip could not identify container type');
+ $r = oci_fetch_array($s);
+ if ($r['DBTYPE'] !== 'CDB$ROOT')
+ die('skip cannot run test using a PDB');
+}
?>
--FILE--
<?php
--TEST--
DRCP: oci8.connection_class with ini_get() and ini_set()
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die("skip no oci8 extension");
+preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+if (!(isset($matches[0]) && $matches[0] >= 11)) {
+ die("skip works only with Oracle 11g or greater version of Oracle client libraries");
+}
+?>
--INI--
oci8.connection_class=test
--FILE--
if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user");
if ($test_drcp) die("skip as Output might vary with DRCP");
-if (preg_match('/Release (11\.2|12)/', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 11gR2 or greater databases");
-} else if (preg_match('/^(11\.2|12\.)/', oci_client_version()) != 1) {
- die("skip test expected to work only with Oracle 11g or greater version of client");
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
+ die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
+ die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
?>
if ($test_drcp) {
die("skip as Output might vary with DRCP");
}
-if (preg_match('/Release (1[1]\.2|12)\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 11gR2 or greater databases");
-} else if (preg_match('/^(11\.2|12)\./', oci_client_version()) != 1) {
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
+ die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
?>
die("skip needs to be run as a DBA user");
if ($test_drcp)
die("skip as Output might vary with DRCP");
-
-if (preg_match('/Release (1[1]\.2|12)\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 11gR2 or greater databases");
-} else if (preg_match('/^(11\.2|12)\./', oci_client_version()) != 1) {
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
+ die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
--TEST--
Test OCI8 php.ini settings
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+if (!(isset($matches[0]) && $matches[0] >= 11)) {
+ die("skip works only with Oracle 11g or greater version of Oracle client libraries");
+}
+?>
--INI--
oci8.privileged_connect = On
oci8.max_persistent = 111
if ($test_drcp) die("skip password change not supported in DRCP Mode");
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches_sv);
-if (isset($matches_sv[1]) && $matches_sv[1] >= 11) {
- preg_match('/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
- if (isset($matches[0]) && $matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] < 5) {
- die ("skip test known to fail using Oracle 10.2.0.4 client libs connecting to Oracle 11 (6277160)");
- }
+preg_match('/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches_sv[0]) && isset($matches[0])
+ && $matches_sv[1] == $matches[1]
+ && $matches_sv[2] == $matches[2]
+ && $matches_sv[3] == $matches[3]
+ && $matches_sv[4] == $matches[4])) {
+ // Avoid diffs due to cross version protocol changes (e.g. like 11.2.0.2-11.2.0.3) and bugs like Oracle bug: 6277160
+ die ("skip test only runs when database client libraries and database server are the same version");
}
// This test in Oracle 12c needs a non-CDB or the root container
-if (isset($matches_sv[1]) && $matches_sv[1] >= 12) {
+if (isset($matches_sv[0]) && $matches_sv[1] >= 12) {
$s = oci_parse($c, "select nvl(sys_context('userenv', 'con_name'), 'notacdb') as dbtype from dual");
$r = @oci_execute($s);
if (!$r)
--FILE--
<?php
-// This test will diff if either the client or the server is 11.2.0.3
-// (or greater) and the other is 11.2.0.2 (or earlier). Both client
-// and server must be upgraded at the same time.
-
require dirname(__FILE__)."/connect.inc";
$new_password = "test";
var_dump(oci_password_change($dbase, $user, $password, $new_password));
-
-if (!empty($dbase)) {
- var_dump($new_c = ocilogon($user,$new_password,$dbase));
-}
-else {
- var_dump($new_c = ocilogon($user,$new_password));
-}
-
+var_dump($new_c = ocilogon($user,$new_password,$dbase));
var_dump(oci_password_change($dbase, $user, $new_password, $password));
if ($test_drcp) die("skip password change not supported in DRCP Mode");
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches_sv);
-if (isset($matches_sv[1]) && $matches_sv[1] >= 11) {
- preg_match('/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
- if (isset($matches[0]) && $matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] < 5) {
- die ("skip test known to fail using Oracle 10.2.0.4 client libs connecting to Oracle 11 (6277160)");
- }
+preg_match('/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches_sv[0]) && isset($matches[0])
+ && $matches_sv[1] == $matches[1]
+ && $matches_sv[2] == $matches[2]
+ && $matches_sv[3] == $matches[3]
+ && $matches_sv[4] == $matches[4])) {
+ // Avoid diffs due to cross version protocol changes (e.g. like 11.2.0.2-11.2.0.3) and bugs like Oracle bug: 6277160
+ die ("skip test only runs when database client libraries and database server are the same version");
}
// This test in Oracle 12c needs a non-CDB or the root container
-if (isset($matches_sv[1]) && $matches_sv[1] >= 12) {
+if (isset($matches_sv[0]) && $matches_sv[1] >= 12) {
$s = oci_parse($c, "select nvl(sys_context('userenv', 'con_name'), 'notacdb') as dbtype from dual");
$r = @oci_execute($s);
if (!$r)
--FILE--
<?php
-// This test will diff if either the client or the server is 11.2.0.3
-// (or greater) and the other is 11.2.0.2 (or earlier). Both client
-// and server must be upgraded at the same time.
-
require dirname(__FILE__)."/connect.inc";
$new_password = "test";
var_dump(ocipasswordchange($dbase, $user, $password, $new_password));
-
-if (!empty($dbase)) {
- var_dump($new_c = ocilogon($user,$new_password,$dbase));
-}
-else {
- var_dump($new_c = ocilogon($user,$new_password));
-}
-
+var_dump($new_c = ocilogon($user,$new_password,$dbase));
var_dump(ocipasswordchange($dbase, $user, $new_password, $password));
-
echo "Done\n";
?>
if ($ov !== 1) {
die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
-if (preg_match('/Unknown/', oci_client_version()) == 1) {
- die("skip expected output only valid with Oracle clients > 9gR2");
-}
?>
--ENV--
ORACLE_HOME=""
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension");
if (!extension_loaded('oci8')) die("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[012]\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10g or greater databases");
-} else if (preg_match('/^(11\.2|12)\./', oci_client_version()) != 1) {
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ ($matches[1] >= 10))) {
+ die("skip expected output only valid when using Oracle 10g or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
?>
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension");
if (!extension_loaded('oci8')) die("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[012]\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10g or greater databases");
-} else if (preg_match('/^(11\.2|12)\./', oci_client_version()) != 1) {
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ ($matches[1] >= 10))) {
+ die("skip expected output only valid when using Oracle 10g or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
?>
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension");
if (!extension_loaded('oci8')) die("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release (11\.2|12)\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 11gR2 or greater databases");
-} else if (preg_match('/^(11\.2|12)\./', oci_client_version()) != 1) {
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
+ die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
-
?>
--FILE--
<?php
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension");
if (!extension_loaded('oci8')) die("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
-if (preg_match('/Release 1[012]\./', oci_server_version($c), $matches) !== 1) {
- die("skip expected output only valid when using Oracle 10g or greater databases");
-} else if (preg_match('/^(11\.2|12)\./', oci_client_version()) != 1) {
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ ($matches[1] >= 10))) {
+ die("skip expected output only valid when using Oracle 10g or greater database server");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 11 && $matches[2] >= 2) ||
+ ($matches[1] >= 12)
+ ))) {
die("skip test expected to work only with Oracle 11gR2 or greater version of client");
}
?>