summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2013-10-16 22:02:32 -0700
committerChristopher Jones <sixd@php.net>2013-10-16 22:02:32 -0700
commit0d909f5bfcfa54d7bfad41270df435500e909da7 (patch)
tree67c2402add5a63a729c6f5edd2a9f09d2bb9d5f2 /ext
parenta1a7522105c333aff3d8c6c61ec68a85c8dd9927 (diff)
downloadphp-git-0d909f5bfcfa54d7bfad41270df435500e909da7.tar.gz
OCI8: Mostly SKIPIF version updates to simplify version checks at the expense of not testing some edge cases with older Oracle patch set versions.
Delete two obsolete .phpt's.
Diffstat (limited to 'ext')
-rw-r--r--ext/oci8/package.xml8
-rw-r--r--ext/oci8/tests/bind_char_1.phpt11
-rw-r--r--ext/oci8/tests/bind_char_1_11gR1.phpt7
-rw-r--r--ext/oci8/tests/bind_char_2.phpt11
-rw-r--r--ext/oci8/tests/bind_char_2_11gR1.phpt7
-rw-r--r--ext/oci8/tests/bind_char_3.phpt11
-rw-r--r--ext/oci8/tests/bind_char_3_11gR1.phpt7
-rw-r--r--ext/oci8/tests/bind_char_4.phpt11
-rw-r--r--ext/oci8/tests/bind_char_4_11gR1.phpt7
-rw-r--r--ext/oci8/tests/bind_misccoltypes.phpt3
-rw-r--r--ext/oci8/tests/bind_number.phpt3
-rw-r--r--ext/oci8/tests/bind_sqltnum.phpt3
-rw-r--r--ext/oci8/tests/bind_unsupported_2.phpt4
-rw-r--r--ext/oci8/tests/bug27303_1.phpt11
-rw-r--r--ext/oci8/tests/bug27303_1_11gR1.phpt8
-rw-r--r--ext/oci8/tests/bug27303_2.phpt11
-rw-r--r--ext/oci8/tests/bug27303_2_11gR1.phpt8
-rw-r--r--ext/oci8/tests/bug27303_4.phpt12
-rw-r--r--ext/oci8/tests/bug27303_4_11gR1.phpt8
-rw-r--r--ext/oci8/tests/bug36403.phpt4
-rw-r--r--ext/oci8/tests/bug43497.phpt4
-rw-r--r--ext/oci8/tests/bug43497_92.phpt305
-rw-r--r--ext/oci8/tests/bug47281.phpt4
-rw-r--r--ext/oci8/tests/clientversion.phpt3
-rw-r--r--ext/oci8/tests/clientversion_92.phpt20
-rw-r--r--ext/oci8/tests/conn_attr_1.phpt4
-rw-r--r--ext/oci8/tests/conn_attr_2.phpt4
-rw-r--r--ext/oci8/tests/conn_attr_3.phpt4
-rw-r--r--ext/oci8/tests/conn_attr_4.phpt4
-rw-r--r--ext/oci8/tests/conn_attr_5.phpt4
-rw-r--r--ext/oci8/tests/connect_without_oracle_home.phpt6
-rw-r--r--ext/oci8/tests/connect_without_oracle_home_11.phpt6
-rw-r--r--ext/oci8/tests/connect_without_oracle_home_old.phpt3
-rw-r--r--ext/oci8/tests/connect_without_oracle_home_old_11.phpt6
-rw-r--r--ext/oci8/tests/drcp_cclass1.phpt14
-rw-r--r--ext/oci8/tests/drcp_connection_class.phpt8
-rw-r--r--ext/oci8/tests/driver_name.phpt17
-rw-r--r--ext/oci8/tests/edition_1.phpt15
-rw-r--r--ext/oci8/tests/edition_2.phpt16
-rw-r--r--ext/oci8/tests/ini_1.phpt8
-rw-r--r--ext/oci8/tests/password_new.phpt28
-rw-r--r--ext/oci8/tests/password_old.phpt29
-rw-r--r--ext/oci8/tests/pecl_bug16035.phpt3
-rw-r--r--ext/oci8/tests/refcur_prefetch_1.phpt13
-rw-r--r--ext/oci8/tests/refcur_prefetch_2.phpt13
-rw-r--r--ext/oci8/tests/refcur_prefetch_3.phpt16
-rw-r--r--ext/oci8/tests/refcur_prefetch_4.phpt13
47 files changed, 168 insertions, 557 deletions
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index f61def59c9..7eccd9d8f9 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -45,7 +45,7 @@ libraries are available.
<active>no</active>
</lead>
- <date>2013-10-08</date>
+ <date>2013-10-17</date>
<time>12:00:00</time>
<version>
@@ -53,8 +53,8 @@ libraries are available.
<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>
@@ -150,7 +150,6 @@ linking works in the new Windows PECL infrastructure.
<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" />
@@ -163,7 +162,6 @@ linking works in the new Windows PECL infrastructure.
<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" />
diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt
index d68991a7f2..dc162ff943 100644
--- a/ext/oci8/tests/bind_char_1.phpt
+++ b/ext/oci8/tests/bind_char_1.phpt
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt
index 2a7c713aa7..bdc29f766d 100644
--- a/ext/oci8/tests/bind_char_1_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_1_11gR1.phpt
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt
index 3695c85854..9c61a858c8 100644
--- a/ext/oci8/tests/bind_char_2.phpt
+++ b/ext/oci8/tests/bind_char_2.phpt
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt
index b9afd6940b..06c37afc93 100644
--- a/ext/oci8/tests/bind_char_2_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_2_11gR1.phpt
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt
index 009e60a542..177676e25c 100644
--- a/ext/oci8/tests/bind_char_3.phpt
+++ b/ext/oci8/tests/bind_char_3.phpt
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt
index a894de00c0..c3ec999d0f 100644
--- a/ext/oci8/tests/bind_char_3_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_3_11gR1.phpt
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt
index 0ac60e503d..b4d3e089b1 100644
--- a/ext/oci8/tests/bind_char_4.phpt
+++ b/ext/oci8/tests/bind_char_4.phpt
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt
index d5ce116afb..ccad2cb789 100644
--- a/ext/oci8/tests/bind_char_4_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_4_11gR1.phpt
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bind_misccoltypes.phpt b/ext/oci8/tests/bind_misccoltypes.phpt
index 0da8c8bf88..9e55b3b1ff 100644
--- a/ext/oci8/tests/bind_misccoltypes.phpt
+++ b/ext/oci8/tests/bind_misccoltypes.phpt
@@ -4,9 +4,6 @@ Bind miscellaneous column types using default types
<?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
diff --git a/ext/oci8/tests/bind_number.phpt b/ext/oci8/tests/bind_number.phpt
index 6412b5f82e..4ae085b4d1 100644
--- a/ext/oci8/tests/bind_number.phpt
+++ b/ext/oci8/tests/bind_number.phpt
@@ -3,9 +3,6 @@ Bind with NUMBER column variants
--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
diff --git a/ext/oci8/tests/bind_sqltnum.phpt b/ext/oci8/tests/bind_sqltnum.phpt
index d3828b73ee..93fc4809ec 100644
--- a/ext/oci8/tests/bind_sqltnum.phpt
+++ b/ext/oci8/tests/bind_sqltnum.phpt
@@ -3,9 +3,6 @@ Bind with SQLT_NUM
--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
diff --git a/ext/oci8/tests/bind_unsupported_2.phpt b/ext/oci8/tests/bind_unsupported_2.phpt
index a2bf9de5a6..b4e2c9b43d 100644
--- a/ext/oci8/tests/bind_unsupported_2.phpt
+++ b/ext/oci8/tests/bind_unsupported_2.phpt
@@ -3,10 +3,6 @@ Bind with various unsupported 10g+ bind types
--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
diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt
index 0ef47f13dd..0b9d2b99e0 100644
--- a/ext/oci8/tests/bug27303_1.phpt
+++ b/ext/oci8/tests/bug27303_1.phpt
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt
index 7b4c158561..d2018783bc 100644
--- a/ext/oci8/tests/bug27303_1_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_1_11gR1.phpt
@@ -6,12 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt
index 72d4e5a7dd..ee2f7b52aa 100644
--- a/ext/oci8/tests/bug27303_2.phpt
+++ b/ext/oci8/tests/bug27303_2.phpt
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt
index 27d8a585bd..06133e0115 100644
--- a/ext/oci8/tests/bug27303_2_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_2_11gR1.phpt
@@ -6,12 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt
index a24ae705ab..ed9d5a1fe6 100644
--- a/ext/oci8/tests/bug27303_4.phpt
+++ b/ext/oci8/tests/bug27303_4.phpt
@@ -6,16 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt
index 01db1dc5a0..550d89fdcc 100644
--- a/ext/oci8/tests/bug27303_4_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_4_11gR1.phpt
@@ -6,12 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
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--
diff --git a/ext/oci8/tests/bug36403.phpt b/ext/oci8/tests/bug36403.phpt
index 4ac32c4b06..122b06bbfa 100644
--- a/ext/oci8/tests/bug36403.phpt
+++ b/ext/oci8/tests/bug36403.phpt
@@ -3,10 +3,6 @@ Bug #36403 (oci_execute no longer supports OCI_DESCRIBE_ONLY)
--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
diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt
index 05798889c4..e3e68aac33 100644
--- a/ext/oci8/tests/bug43497.phpt
+++ b/ext/oci8/tests/bug43497.phpt
@@ -5,10 +5,6 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory)
$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
diff --git a/ext/oci8/tests/bug43497_92.phpt b/ext/oci8/tests/bug43497_92.phpt
deleted file mode 100644
index cc2a96318c..0000000000
--- a/ext/oci8/tests/bug43497_92.phpt
+++ /dev/null
@@ -1,305 +0,0 @@
---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
diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt
index 0098ec5ebb..00c43c22da 100644
--- a/ext/oci8/tests/bug47281.phpt
+++ b/ext/oci8/tests/bug47281.phpt
@@ -6,9 +6,9 @@ $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on t
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");
}
diff --git a/ext/oci8/tests/clientversion.phpt b/ext/oci8/tests/clientversion.phpt
index db70b5affc..262ded462f 100644
--- a/ext/oci8/tests/clientversion.phpt
+++ b/ext/oci8/tests/clientversion.phpt
@@ -3,9 +3,6 @@ oci_client_version()
--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
diff --git a/ext/oci8/tests/clientversion_92.phpt b/ext/oci8/tests/clientversion_92.phpt
deleted file mode 100644
index d4b92cd354..0000000000
--- a/ext/oci8/tests/clientversion_92.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---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===
diff --git a/ext/oci8/tests/conn_attr_1.phpt b/ext/oci8/tests/conn_attr_1.phpt
index 631bc19c1d..745b1cd93f 100644
--- a/ext/oci8/tests/conn_attr_1.phpt
+++ b/ext/oci8/tests/conn_attr_1.phpt
@@ -13,10 +13,6 @@ preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit
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
diff --git a/ext/oci8/tests/conn_attr_2.phpt b/ext/oci8/tests/conn_attr_2.phpt
index 432a3cff04..ad83f70c20 100644
--- a/ext/oci8/tests/conn_attr_2.phpt
+++ b/ext/oci8/tests/conn_attr_2.phpt
@@ -12,10 +12,6 @@ preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit
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
diff --git a/ext/oci8/tests/conn_attr_3.phpt b/ext/oci8/tests/conn_attr_3.phpt
index 921487c9a0..1b00ac5a4f 100644
--- a/ext/oci8/tests/conn_attr_3.phpt
+++ b/ext/oci8/tests/conn_attr_3.phpt
@@ -12,10 +12,6 @@ preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit
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
diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt
index f32f9876d5..0a6b814e4b 100644
--- a/ext/oci8/tests/conn_attr_4.phpt
+++ b/ext/oci8/tests/conn_attr_4.phpt
@@ -17,10 +17,6 @@ if (!(isset($matches[0]) &&
// 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
diff --git a/ext/oci8/tests/conn_attr_5.phpt b/ext/oci8/tests/conn_attr_5.phpt
index 77f233b4e2..70a6d2b096 100644
--- a/ext/oci8/tests/conn_attr_5.phpt
+++ b/ext/oci8/tests/conn_attr_5.phpt
@@ -12,10 +12,6 @@ preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit
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
diff --git a/ext/oci8/tests/connect_without_oracle_home.phpt b/ext/oci8/tests/connect_without_oracle_home.phpt
index 0acd2bc33a..831fc23d61 100644
--- a/ext/oci8/tests/connect_without_oracle_home.phpt
+++ b/ext/oci8/tests/connect_without_oracle_home.phpt
@@ -10,9 +10,9 @@ $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
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--
diff --git a/ext/oci8/tests/connect_without_oracle_home_11.phpt b/ext/oci8/tests/connect_without_oracle_home_11.phpt
index 40dc5a98fc..42c4564456 100644
--- a/ext/oci8/tests/connect_without_oracle_home_11.phpt
+++ b/ext/oci8/tests/connect_without_oracle_home_11.phpt
@@ -10,10 +10,10 @@ $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
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");
}
diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt
index 5a731337af..82d8ae451b 100644
--- a/ext/oci8/tests/connect_without_oracle_home_old.phpt
+++ b/ext/oci8/tests/connect_without_oracle_home_old.phpt
@@ -10,9 +10,6 @@ $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
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=""
diff --git a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt
index e04016f41a..eb5fb0cc4d 100644
--- a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt
+++ b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt
@@ -10,10 +10,10 @@ $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
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");
}
diff --git a/ext/oci8/tests/drcp_cclass1.phpt b/ext/oci8/tests/drcp_cclass1.phpt
index 068331e5a9..5c78a2943e 100644
--- a/ext/oci8/tests/drcp_cclass1.phpt
+++ b/ext/oci8/tests/drcp_cclass1.phpt
@@ -3,9 +3,21 @@ DRCP: Test setting connection class inline
--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
diff --git a/ext/oci8/tests/drcp_connection_class.phpt b/ext/oci8/tests/drcp_connection_class.phpt
index 2aed131c14..c01c144d23 100644
--- a/ext/oci8/tests/drcp_connection_class.phpt
+++ b/ext/oci8/tests/drcp_connection_class.phpt
@@ -1,7 +1,13 @@
--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--
diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt
index bf86e66e7b..f63979d6b5 100644
--- a/ext/oci8/tests/driver_name.phpt
+++ b/ext/oci8/tests/driver_name.phpt
@@ -7,10 +7,19 @@ require(dirname(__FILE__)."/connect.inc");
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");
}
?>
diff --git a/ext/oci8/tests/edition_1.phpt b/ext/oci8/tests/edition_1.phpt
index d8ca53cddf..3e55ee902c 100644
--- a/ext/oci8/tests/edition_1.phpt
+++ b/ext/oci8/tests/edition_1.phpt
@@ -10,9 +10,18 @@ if (strcasecmp($user, "system") && strcasecmp($user, "sys")) {
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");
}
?>
diff --git a/ext/oci8/tests/edition_2.phpt b/ext/oci8/tests/edition_2.phpt
index 0ffb62dc32..12e902667e 100644
--- a/ext/oci8/tests/edition_2.phpt
+++ b/ext/oci8/tests/edition_2.phpt
@@ -8,10 +8,18 @@ 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 (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");
}
diff --git a/ext/oci8/tests/ini_1.phpt b/ext/oci8/tests/ini_1.phpt
index 4c23b72b41..2fba79813e 100644
--- a/ext/oci8/tests/ini_1.phpt
+++ b/ext/oci8/tests/ini_1.phpt
@@ -1,7 +1,13 @@
--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
diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt
index 2c66dd94ab..a29fb8f52f 100644
--- a/ext/oci8/tests/password_new.phpt
+++ b/ext/oci8/tests/password_new.phpt
@@ -8,15 +8,18 @@ if (empty($dbase)) die ("skip requires database connection string be set");
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)
@@ -29,22 +32,11 @@ if (isset($matches_sv[1]) && $matches_sv[1] >= 12) {
--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));
diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt
index 2e186528e3..873fd4f595 100644
--- a/ext/oci8/tests/password_old.phpt
+++ b/ext/oci8/tests/password_old.phpt
@@ -8,15 +8,18 @@ if (empty($dbase)) die ("skip requires database connection string be set");
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)
@@ -29,25 +32,13 @@ if (isset($matches_sv[1]) && $matches_sv[1] >= 12) {
--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";
?>
diff --git a/ext/oci8/tests/pecl_bug16035.phpt b/ext/oci8/tests/pecl_bug16035.phpt
index ddd0038de1..29ff6439d1 100644
--- a/ext/oci8/tests/pecl_bug16035.phpt
+++ b/ext/oci8/tests/pecl_bug16035.phpt
@@ -10,9 +10,6 @@ $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
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=""
diff --git a/ext/oci8/tests/refcur_prefetch_1.phpt b/ext/oci8/tests/refcur_prefetch_1.phpt
index ea09fbcd97..c7e200932a 100644
--- a/ext/oci8/tests/refcur_prefetch_1.phpt
+++ b/ext/oci8/tests/refcur_prefetch_1.phpt
@@ -4,9 +4,16 @@ Prefetch with REF cursor. Test different values for prefetch with oci_set_prefet
<?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");
}
?>
diff --git a/ext/oci8/tests/refcur_prefetch_2.phpt b/ext/oci8/tests/refcur_prefetch_2.phpt
index 8d65251077..9b2472db5d 100644
--- a/ext/oci8/tests/refcur_prefetch_2.phpt
+++ b/ext/oci8/tests/refcur_prefetch_2.phpt
@@ -4,9 +4,16 @@ Prefetch with REF cursor. Test No 2
<?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");
}
?>
diff --git a/ext/oci8/tests/refcur_prefetch_3.phpt b/ext/oci8/tests/refcur_prefetch_3.phpt
index 974864cbd9..f29345e515 100644
--- a/ext/oci8/tests/refcur_prefetch_3.phpt
+++ b/ext/oci8/tests/refcur_prefetch_3.phpt
@@ -6,12 +6,20 @@ oci8.default_prefetch=5
<?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
diff --git a/ext/oci8/tests/refcur_prefetch_4.phpt b/ext/oci8/tests/refcur_prefetch_4.phpt
index d24398c00e..f0c7183d0e 100644
--- a/ext/oci8/tests/refcur_prefetch_4.phpt
+++ b/ext/oci8/tests/refcur_prefetch_4.phpt
@@ -4,9 +4,16 @@ Prefetch with REF cursor. Test No 4
<?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");
}
?>