]> granicus.if.org Git - php/commitdiff
OCI8: Mostly SKIPIF version updates to simplify version checks at the expense of...
authorChristopher Jones <sixd@php.net>
Thu, 17 Oct 2013 05:02:32 +0000 (22:02 -0700)
committerChristopher Jones <sixd@php.net>
Thu, 17 Oct 2013 05:02:32 +0000 (22:02 -0700)
Delete two obsolete .phpt's.

47 files changed:
ext/oci8/package.xml
ext/oci8/tests/bind_char_1.phpt
ext/oci8/tests/bind_char_1_11gR1.phpt
ext/oci8/tests/bind_char_2.phpt
ext/oci8/tests/bind_char_2_11gR1.phpt
ext/oci8/tests/bind_char_3.phpt
ext/oci8/tests/bind_char_3_11gR1.phpt
ext/oci8/tests/bind_char_4.phpt
ext/oci8/tests/bind_char_4_11gR1.phpt
ext/oci8/tests/bind_misccoltypes.phpt
ext/oci8/tests/bind_number.phpt
ext/oci8/tests/bind_sqltnum.phpt
ext/oci8/tests/bind_unsupported_2.phpt
ext/oci8/tests/bug27303_1.phpt
ext/oci8/tests/bug27303_1_11gR1.phpt
ext/oci8/tests/bug27303_2.phpt
ext/oci8/tests/bug27303_2_11gR1.phpt
ext/oci8/tests/bug27303_4.phpt
ext/oci8/tests/bug27303_4_11gR1.phpt
ext/oci8/tests/bug36403.phpt
ext/oci8/tests/bug43497.phpt
ext/oci8/tests/bug43497_92.phpt [deleted file]
ext/oci8/tests/bug47281.phpt
ext/oci8/tests/clientversion.phpt
ext/oci8/tests/clientversion_92.phpt [deleted file]
ext/oci8/tests/conn_attr_1.phpt
ext/oci8/tests/conn_attr_2.phpt
ext/oci8/tests/conn_attr_3.phpt
ext/oci8/tests/conn_attr_4.phpt
ext/oci8/tests/conn_attr_5.phpt
ext/oci8/tests/connect_without_oracle_home.phpt
ext/oci8/tests/connect_without_oracle_home_11.phpt
ext/oci8/tests/connect_without_oracle_home_old.phpt
ext/oci8/tests/connect_without_oracle_home_old_11.phpt
ext/oci8/tests/drcp_cclass1.phpt
ext/oci8/tests/drcp_connection_class.phpt
ext/oci8/tests/driver_name.phpt
ext/oci8/tests/edition_1.phpt
ext/oci8/tests/edition_2.phpt
ext/oci8/tests/ini_1.phpt
ext/oci8/tests/password_new.phpt
ext/oci8/tests/password_old.phpt
ext/oci8/tests/pecl_bug16035.phpt
ext/oci8/tests/refcur_prefetch_1.phpt
ext/oci8/tests/refcur_prefetch_2.phpt
ext/oci8/tests/refcur_prefetch_3.phpt
ext/oci8/tests/refcur_prefetch_4.phpt

index f61def59c98516b6e2ad6f546989e6a749a9c42a..7eccd9d8f9950038385759db665979d23d3ed7b4 100644 (file)
@@ -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" />
index d68991a7f2bafffe8856c07fdc7282e5b5b9bdcf..dc162ff9431822bd9c5dfe4b26d45dcce82f3787 100644 (file)
@@ -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--
index 2a7c713aa7f15a02b6a7ab28ed35401b3585e6af..bdc29f766dab35c0a08a36fde7e153a9bca8e36e 100644 (file)
@@ -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--
index 3695c8585490499dff1c4f9031fd89858492ef9f..9c61a858c8e7130297c636d2b282dc15e84ab647 100644 (file)
@@ -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--
index b9afd6940bccad8b9cdf315510753efa955d54e6..06c37afc93e20d9b535a0aeee22b8fdea158d2c5 100644 (file)
@@ -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--
index 009e60a542b6ab06e5e6e0860d2545992ebb6b44..177676e25ca3b19d3177dc0369e02ba56ce39aad 100644 (file)
@@ -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--
index a894de00c075fd5ed5cc1b5353b55cedb7847da6..c3ec999d0f10d08dd4086dbc5e29680674d47abc 100644 (file)
@@ -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--
index 0ac60e503de870a242fe7e5ff76cd7b42934af85..b4d3e089b136f34584a9f6a5c98e190a8414107a 100644 (file)
@@ -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--
index d5ce116afb65a5a1a68180640e7fcc1f02b16d3a..ccad2cb7894c160dd4a8127f20bc3c7eb5021e3b 100644 (file)
@@ -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--
index 0da8c8bf8803a16810d59cdb15ef3c68318f2e01..9e55b3b1ff74be102ceebc42315988d4fd67f88e 100644 (file)
@@ -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
index 6412b5f82e78403047ed419ad2c6b8c27f3c2125..4ae085b4d18b420c8ec46d4a403ab9170ca308f4 100644 (file)
@@ -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
index d3828b73eea95aa3a5f0e3f19178782908d10020..93fc4809ec10d43f4a59bd1694bf09157ab3bfcc 100644 (file)
@@ -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
index a2bf9de5a6b6053eb66f507d7b627b43245a56a1..b4e2c9b43dec41bc908b285f2b0dae00fa6214e9 100644 (file)
@@ -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
index 0ef47f13ddeef4d0646a075afa1ada137d5f67fb..0b9d2b99e0ee6cbce9b9c3581e5d1fe55dd5b9d5 100644 (file)
@@ -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--
index 7b4c158561959027e62619c7ea70dff676fb08ed..d2018783bc925932ee3c3be2e109d687af3a5e59 100644 (file)
@@ -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--
index 72d4e5a7ddbcf2a63bc84937b5b47329f1cc1878..ee2f7b52aa5e6d1ad68516784883313275a0adbc 100644 (file)
@@ -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--
index 27d8a585bd452a16e63fd80cf2d5144f151925b5..06133e01157233b7ed2b0394b2b390478e01a598 100644 (file)
@@ -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--
index a24ae705aba57332e0df6ad9156b594ab8499bb7..ed9d5a1fe6d43d69de1650bc7e34dd171f7cf528 100644 (file)
@@ -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--
index 01db1dc5a0bef25e14cd533b0e5bccff183460e8..550d89fdcc52f39e7347a7b883e5ed574e3cdeeb 100644 (file)
@@ -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--
index 4ac32c4b069a567fa38a20a904246ea5fbd5f336..122b06bbfa2b0997156c317763f7d60fec9732c3 100644 (file)
@@ -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
index 05798889c4320c358cce80a048fb2fcafdb48e13..e3e68aac3380cd91da4a0cb0a8fafcd52d32df85 100644 (file)
@@ -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 (file)
index cc2a963..0000000
+++ /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
index 0098ec5ebb7727871c701a509f92933557934c03..00c43c22dac7cfb196a8b0e946feb9625a062432 100644 (file)
@@ -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");
 }
index db70b5affcea409cc0bab66a3a7e51c44f1d8b0e..262ded462f9d9c2b52dd8f758deb7b5710cb2722 100644 (file)
@@ -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 (file)
index d4b92cd..0000000
+++ /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===
index 631bc19c1d4169b9e282c2f3ba87151c29ef5607..745b1cd93f906d7e762693c208c8239ed8b729ee 100644 (file)
@@ -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
index 432a3cff0494e818b006733652dd1c6a89e07b39..ad83f70c2019fdfdbf9f7d0a76e48997360c3a69 100644 (file)
@@ -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
index 921487c9a00e1ee1ef4a48d83f20055de44c036f..1b00ac5a4ff45968b3a06b2b63b7e70b78f81c99 100644 (file)
@@ -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
index f32f9876d532d2761a0b00b8b2aedcafb718e08e..0a6b814e4b8dcf1585a536e223b9dbb44d990b58 100644 (file)
@@ -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
index 77f233b4e21e4f110d43b76b6ba352558f6f47dc..70a6d2b096e79a08d02f11886a38313a0c194fa9 100644 (file)
@@ -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
index 0acd2bc33a76f5b601354dd5e2f7e3cc76be03fc..831fc23d610eb110b263b9bdc056310979b5f445 100644 (file)
@@ -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--
index 40dc5a98fc7e3df562be719faa995f366f840f9e..42c45644567c4c30af89e47b6a14be18f103a55e 100644 (file)
@@ -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");
 }
index 5a731337af13c80ed0fd5f09deae3b8e2a020d94..82d8ae451bc704e669fce1b179085c7c85da5ac4 100644 (file)
@@ -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=""
index e04016f41a766e4fcf1bb389ec2476f4de86f460..eb5fb0cc4d3335e742a468a7c7f217292372d996 100644 (file)
@@ -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");
 }
index 068331e5a95aedabc07296a028382716192e5229..5c78a2943e94ec3bcf1ecf9bef9e0708dd5dc884 100644 (file)
@@ -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
index 2aed131c14b547484d1adb9ff001e97d5027d8fd..c01c144d236955df846bd35b2966e66c3db7a966 100644 (file)
@@ -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--
index bf86e66e7b64fc1b272f4780c0127eda5a00723d..f63979d6b54c0e8ee1bf25ad595c99bcae767e17 100644 (file)
@@ -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");
 }
 
 ?>
index d8ca53cddf0616163587cee4b76773329a208e63..3e55ee902c970db73ef3c973596e28ca3d2fd439 100644 (file)
@@ -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");
 }
 ?>
index 0ffb62dc32633370df3b04162c0fe9127939ae19..12e902667e6216302c56973c20f53eaad5d8fce5 100644 (file)
@@ -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");
 }
 
index 4c23b72b41fdbd9bfd93665d549ea4606e2075a7..2fba79813e845d722ac86b42dccbba9a19315eaf 100644 (file)
@@ -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
index 2c66dd94ab7dcb2fe608c15e4a754a8bf64bbbb4..a29fb8f52ff2bdec96ed2f73bf678c5b0263f037 100644 (file)
@@ -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));
 
 
index 2e186528e3d9a371fb5ac0887f93caf51ed66c48..873fd4f5953e97028f9b7bf03ff5722f398d8d23 100644 (file)
@@ -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";
 
 ?>
index ddd0038de1524f31700daa22eaffbff4ff35bf15..29ff6439d1c8a05b92f7bec4bb2a01ca6b476d95 100644 (file)
@@ -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=""
index ea09fbcd979cf9bb0a79df26a34ba9d75f43b78b..c7e200932aecef7435537b5213d1145dda16418a 100644 (file)
@@ -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");
 }
 ?>
index 8d65251077ea307d1d670de4d5eb6433e6fe6c16..9b2472db5df44a06542c622cfbef0daa8dfce378 100644 (file)
@@ -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");
 }
 ?>
index 974864cbd90e74f1b7235adf8005a936cbd6604e..f29345e515d47a110794c888e7149223c2aea801 100644 (file)
@@ -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
index d24398c00e6bf9de3fc72f929dcea9e67e8865ac..f0c7183d0e9da7bcf8bf282425c624713adc8000 100644 (file)
@@ -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");
 }
 ?>