Browse Source

Update for new Oracle patchset variation

pull/271/head
Christopher Jones 15 years ago
parent
commit
735efbdd04
  1. 10
      ext/oci8/tests/bind_char_1.phpt
  2. 11
      ext/oci8/tests/bind_char_1_11gR1.phpt
  3. 10
      ext/oci8/tests/bind_char_2.phpt
  4. 11
      ext/oci8/tests/bind_char_2_11gR1.phpt
  5. 10
      ext/oci8/tests/bind_char_3.phpt
  6. 11
      ext/oci8/tests/bind_char_3_11gR1.phpt
  7. 10
      ext/oci8/tests/bind_char_4.phpt
  8. 11
      ext/oci8/tests/bind_char_4_11gR1.phpt
  9. 10
      ext/oci8/tests/bug27303_1.phpt
  10. 11
      ext/oci8/tests/bug27303_1_11gR1.phpt
  11. 10
      ext/oci8/tests/bug27303_2.phpt
  12. 11
      ext/oci8/tests/bug27303_2_11gR1.phpt
  13. 20
      ext/oci8/tests/bug27303_4.phpt
  14. 21
      ext/oci8/tests/bug27303_4_11gR1.phpt
  15. 4
      ext/oci8/tests/password_new.phpt
  16. 4
      ext/oci8/tests/password_old.phpt

10
ext/oci8/tests/bind_char_1.phpt

@ -4,9 +4,13 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else if (preg_match('/^11\./', oci_client_version()) != 1) {
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
}
}
if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>

11
ext/oci8/tests/bind_char_1_11gR1.phpt

@ -4,12 +4,15 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
$sv = oci_server_version($c);
$sv = preg_match('/Release 11\.1\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 11gR1 database");
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
}
?>
--ENV--
NLS_LANG=
--FILE--
<?php

10
ext/oci8/tests/bind_char_2.phpt

@ -4,9 +4,13 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else if (preg_match('/^11\./', oci_client_version()) != 1) {
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
}
}
if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>

11
ext/oci8/tests/bind_char_2_11gR1.phpt

@ -4,12 +4,15 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
$sv = oci_server_version($c);
$sv = preg_match('/Release 11\.1\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 11gR1 database");
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
}
?>
--ENV--
NLS_LANG=
--FILE--
<?php

10
ext/oci8/tests/bind_char_3.phpt

@ -4,9 +4,13 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else if (preg_match('/^11\./', oci_client_version()) != 1) {
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
}
}
if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>

11
ext/oci8/tests/bind_char_3_11gR1.phpt

@ -4,12 +4,15 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
$sv = oci_server_version($c);
$sv = preg_match('/Release 11\.1\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 11gR1 database");
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
}
?>
--ENV--
NLS_LANG=
--FILE--
<?php

10
ext/oci8/tests/bind_char_4.phpt

@ -4,9 +4,13 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else if (preg_match('/^11\./', oci_client_version()) != 1) {
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
}
}
if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>

11
ext/oci8/tests/bind_char_4_11gR1.phpt

@ -4,12 +4,15 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
$sv = oci_server_version($c);
$sv = preg_match('/Release 11\.1\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 11gR1 database");
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
}
}
?>
--ENV--
NLS_LANG=
--FILE--
<?php

10
ext/oci8/tests/bug27303_1.phpt

@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else if (preg_match('/^11\./', oci_client_version()) != 1) {
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 &&
preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) {
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
}
if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>

11
ext/oci8/tests/bug27303_1_11gR1.phpt

@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
$sv = oci_server_version($c);
$sv = preg_match('/Release 11\.1\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 11gR1 database");
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.1\.0\.6/', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using specific Oracle database versions");
}
}
}
?>
--FILE--

10
ext/oci8/tests/bug27303_2.phpt

@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else if (preg_match('/^11\./', oci_client_version()) != 1) {
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 &&
preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) {
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
}
if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>

11
ext/oci8/tests/bug27303_2_11gR1.phpt

@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
$sv = oci_server_version($c);
$sv = preg_match('/Release 11\.1\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 11gR1 database");
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.1\.0\.6/', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using specific Oracle database versions");
}
}
}
?>
--FILE--

20
ext/oci8/tests/bug27303_4.phpt

@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else if (preg_match('/^11\./', oci_client_version()) != 1) {
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 &&
preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) {
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
}
if (preg_match('/^11\./', oci_client_version()) != 1) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>
@ -23,10 +27,7 @@ $create_st[] = "drop table mytab";
$create_st[] = "create sequence myseq";
$create_st[] = "create table mytab (mydata varchar2(20), seqcol number)";
foreach ($create_st as $statement) {
$stmt = oci_parse($c, $statement);
oci_execute($stmt);
}
oci8_test_sql_execute($c, $create_st);
define('MYLIMIT', 200);
@ -50,10 +51,7 @@ $drop_st = array();
$drop_st[] = "drop sequence myseq";
$drop_st[] = "drop table mytab";
foreach ($create_st as $statement) {
$stmt = oci_parse($c, $statement);
oci_execute($stmt);
}
oci8_test_sql_execute($c, $drop_st);
echo "Done\n";
?>

21
ext/oci8/tests/bug27303_4_11gR1.phpt

@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters)
<?php
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
$sv = oci_server_version($c);
$sv = preg_match('/Release 11\.1\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 11gR1 database");
// The bind buffer size edge cases seem to change each DB version.
if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.1\.0\.6/', oci_server_version($c), $matches) !== 1) {
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
die("skip expected output only valid when using specific Oracle database versions");
}
}
}
?>
--FILE--
@ -21,10 +24,7 @@ $create_st[] = "drop table mytab";
$create_st[] = "create sequence myseq";
$create_st[] = "create table mytab (mydata varchar2(20), seqcol number)";
foreach ($create_st as $statement) {
$stmt = oci_parse($c, $statement);
oci_execute($stmt);
}
oci8_test_sql_execute($c, $create_st);
define('MYLIMIT', 200);
@ -48,10 +48,7 @@ $drop_st = array();
$drop_st[] = "drop sequence myseq";
$drop_st[] = "drop table mytab";
foreach ($create_st as $statement) {
$stmt = oci_parse($c, $statement);
oci_execute($stmt);
}
oci8_test_sql_execute($c, $drop_st);
echo "Done\n";
?>

4
ext/oci8/tests/password_new.phpt

@ -17,6 +17,10 @@ if (preg_match('/Release (11|12)\./', oci_server_version($c), $matches) === 1 &&
--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";

4
ext/oci8/tests/password_old.phpt

@ -19,6 +19,10 @@ if (preg_match('/Release (11|12)\./', oci_server_version($c), $matches) === 1 &&
--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";

Loading…
Cancel
Save