diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
commit | 8f1428d29ef91d74b4d272af171675f2971eb15b (patch) | |
tree | a1f4f4d7dc5bfe8096806dd5c5266634e19fa07a /ext/oci8/tests | |
parent | c6e4182351e0173fe58de141e143aac2eacf5efe (diff) | |
download | php-8f1428d29ef91d74b4d272af171675f2971eb15b.tar.gz |
Imported Upstream version 5.3.9upstream/5.3.9
Diffstat (limited to 'ext/oci8/tests')
40 files changed, 259 insertions, 109 deletions
diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt index 94bce02e3..0875c694f 100644 --- a/ext/oci8/tests/array_bind_003.phpt +++ b/ext/oci8/tests/array_bind_003.phpt @@ -62,7 +62,9 @@ var_dump($array); echo "Done\n"; ?> --EXPECTF-- -Warning: oci_execute(): OCI_NO_DATA in %s on line %d +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d +ORA-06512: at line %d in %sarray_bind_003.php on line %d array(4) { [0]=> string(9) "06-DEC-05" diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt index 1eb1fc7fa..df74025d7 100644 --- a/ext/oci8/tests/array_bind_004.phpt +++ b/ext/oci8/tests/array_bind_004.phpt @@ -62,7 +62,9 @@ var_dump($array); echo "Done\n"; ?> --EXPECTF-- -Warning: oci_execute(): OCI_NO_DATA in %s on line %d +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d +ORA-06512: at line %d in %sarray_bind_004.php on line %d array(0) { } Done diff --git a/ext/oci8/tests/array_bind_bdouble.phpt b/ext/oci8/tests/array_bind_bdouble.phpt new file mode 100644 index 000000000..1bb95b236 --- /dev/null +++ b/ext/oci8/tests/array_bind_bdouble.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_BDOUBLE +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BDOUBLE); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 22 in %sarray_bind_bdouble.php on line %d +Done diff --git a/ext/oci8/tests/array_bind_bfloat.phpt b/ext/oci8/tests/array_bind_bfloat.phpt new file mode 100644 index 000000000..0b8fad6e6 --- /dev/null +++ b/ext/oci8/tests/array_bind_bfloat.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_BFLOAT +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BFLOAT); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 21 in %sarray_bind_bfloat.php on line %d +Done diff --git a/ext/oci8/tests/array_bind_uin.phpt b/ext/oci8/tests/array_bind_uin.phpt new file mode 100644 index 000000000..3ce039e0d --- /dev/null +++ b/ext/oci8/tests/array_bind_uin.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_UIN +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_UIN); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 68 in %sarray_bind_uin.php on line %d +Done diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index a668294d4..91fa4b75b 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/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"); } ?> diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt index 55973a61b..a7feff9f6 100644 --- a/ext/oci8/tests/bind_char_1_11gR1.phpt +++ b/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 diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt index 53785e066..43661a065 100644 --- a/ext/oci8/tests/bind_char_2.phpt +++ b/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"); } ?> diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt index 357a716e6..8bb28733f 100644 --- a/ext/oci8/tests/bind_char_2_11gR1.phpt +++ b/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 diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt index a459f616b..25115836d 100644 --- a/ext/oci8/tests/bind_char_3.phpt +++ b/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"); } ?> diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt index 1e7da47ed..4c6241ccf 100644 --- a/ext/oci8/tests/bind_char_3_11gR1.phpt +++ b/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 diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt index 34d703c52..36765f813 100644 --- a/ext/oci8/tests/bind_char_4.phpt +++ b/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"); } ?> diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt index 87b7daba8..14d587885 100644 --- a/ext/oci8/tests/bind_char_4_11gR1.phpt +++ b/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 diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt index 028f5b793..40ab4ebed 100644 --- a/ext/oci8/tests/bug27303_1.phpt +++ b/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"); } ?> diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt index 20097613f..6de9b9937 100644 --- a/ext/oci8/tests/bug27303_1_11gR1.phpt +++ b/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-- diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index e7564ac21..1fb2b3168 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/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"); } ?> diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt index c2b5c433c..1e3e3105a 100644 --- a/ext/oci8/tests/bug27303_2_11gR1.phpt +++ b/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-- diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index 0dcfed913..3137db865 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/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"; ?> diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt index 0c88360be..f9bc2da8a 100644 --- a/ext/oci8/tests/bug27303_4_11gR1.phpt +++ b/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"; ?> diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt index abf6cc8c7..d430474fa 100644 --- a/ext/oci8/tests/bug42496_1.phpt +++ b/ext/oci8/tests/bug42496_1.phpt @@ -4,7 +4,7 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php @@ -14,11 +14,11 @@ require dirname(__FILE__).'/connect.inc'; // Initialization $stmtarray = array( - "DROP table bug42496_tab", - "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)", - "INSERT INTO bug42496_tab VALUES('test1', 'test1')", - "INSERT INTO bug42496_tab VALUES('test2', 'test2')", - "INSERT INTO bug42496_tab VALUES('test3', 'test3')" + "DROP table bug42496_1_tab", + "CREATE table bug42496_1_tab(c1 CLOB, c2 CLOB)", + "INSERT INTO bug42496_1_tab VALUES('test1', 'test1')", + "INSERT INTO bug42496_1_tab VALUES('test2', 'test2')", + "INSERT INTO bug42496_1_tab VALUES('test3', 'test3')" ); oci8_test_sql_execute($c, $stmtarray); @@ -28,7 +28,7 @@ oci8_test_sql_execute($c, $stmtarray); echo "Test 1\n"; for ($i = 0; $i < 15000; $i++) { - $s = oci_parse($c, "SELECT * from bug42496_tab"); + $s = oci_parse($c, "SELECT * from bug42496_1_tab"); oci_define_by_name($s, "C1", $col1); oci_define_by_name($s, "C2", $col2); if (oci_execute($s)) { @@ -46,7 +46,7 @@ echo "Done\n"; // Cleanup $stmtarray = array( - "DROP table bug42496_tab" + "DROP table bug42496_1_tab" ); oci8_test_sql_execute($c, $stmtarray); diff --git a/ext/oci8/tests/bug42496_2.phpt b/ext/oci8/tests/bug42496_2.phpt index 8c4b79141..71854f3d4 100644 --- a/ext/oci8/tests/bug42496_2.phpt +++ b/ext/oci8/tests/bug42496_2.phpt @@ -4,7 +4,7 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php @@ -14,11 +14,11 @@ require dirname(__FILE__).'/connect.inc'; // Initialization $stmtarray = array( - "DROP table bug42496_tab", - "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)", - "INSERT INTO bug42496_tab VALUES('test1', 'test1')", - "INSERT INTO bug42496_tab VALUES('test2', 'test2')", - "INSERT INTO bug42496_tab VALUES('test3', 'test3')" + "DROP table bug42496_2_tab", + "CREATE table bug42496_2_tab(c1 CLOB, c2 CLOB)", + "INSERT INTO bug42496_2_tab VALUES('test1', 'test1')", + "INSERT INTO bug42496_2_tab VALUES('test2', 'test2')", + "INSERT INTO bug42496_2_tab VALUES('test3', 'test3')" ); oci8_test_sql_execute($c, $stmtarray); @@ -28,7 +28,7 @@ oci8_test_sql_execute($c, $stmtarray); echo "Test 2\n"; for ($i = 0; $i < 15000; $i++) { - $s = oci_parse($c, "SELECT * from bug42496_tab"); + $s = oci_parse($c, "SELECT * from bug42496_2_tab"); if (oci_execute($s)) { $arr = array(); while ($arr = oci_fetch_assoc($s)) { @@ -44,7 +44,7 @@ echo "Done\n"; // Cleanup $stmtarray = array( - "DROP table bug42496_tab" + "DROP table bug42496_2_tab" ); oci8_test_sql_execute($c, $stmtarray); diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt index 600fb047b..8c57fabee 100644 --- a/ext/oci8/tests/bug43497.phpt +++ b/ext/oci8/tests/bug43497.phpt @@ -4,7 +4,7 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (preg_match('/^1[01]\./', oci_client_version()) != 1) { die("skip expected output only valid with Oracle 10g or greater version of client"); } diff --git a/ext/oci8/tests/bug43497_92.phpt b/ext/oci8/tests/bug43497_92.phpt index 932a863d7..d4201257c 100644 --- a/ext/oci8/tests/bug43497_92.phpt +++ b/ext/oci8/tests/bug43497_92.phpt @@ -4,7 +4,7 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (preg_match('/Unknown/', oci_client_version()) != 1) { die("skip expected output only valid with Oracle 9gR2 clients"); } diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt index aa4f2bb8e..d44171561 100644 --- a/ext/oci8/tests/bug44113.phpt +++ b/ext/oci8/tests/bug44113.phpt @@ -4,7 +4,7 @@ Bug #44113 (New collection creation can fail with OCI-22303) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt index 6b94bdef2..d0e002353 100644 --- a/ext/oci8/tests/bug47281.phpt +++ b/ext/oci8/tests/bug47281.phpt @@ -4,6 +4,13 @@ Bug #47281 ($php_errormsg is limited in size of characters) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +// error3.phpt obsoletes this test for newer Oracle client versions +// Assume runtime client version is >= compile time client version +$cv = explode('.', oci_client_version()); +if ($cv[0] > 11 || ($cv[0] == 11 && $cv[1] > 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] >= 3)) { + die("skip test works only with Oracle 11.2.0.2 or earlier Oracle client libraries"); +} + ?> --ENV-- NLS_LANG=.AL32UTF8 diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index b1a22858a..d15b7a38d 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -4,10 +4,10 @@ Set and get of connection attributes with errors. <?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'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); if (preg_match('/Release (11\.2|12)\./', oci_server_version($c), $matches) !== 1) { // Bug fixed in 11.2 prevents client_info being rest diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc index 4c07e636e..0f03c3a65 100644 --- a/ext/oci8/tests/details.inc +++ b/ext/oci8/tests/details.inc @@ -9,10 +9,6 @@ * greater, and $dbase should be set to the tnsnames.ora entry * corresponding to the POOLED server instance or an Easy Connect * string like hostname:port/service_name:POOLED - * - * Set $stress_test to TRUE if you want to run some longer/slower/more - * memory intensive tests. External configuration such as increasing - * the timeout of run-tests.php may also be needed. */ if (file_exists(dirname(__FILE__)."/details_local.inc")) { @@ -23,23 +19,16 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) { $password = getenv('PHP_OCI8_TEST_PASS'); // Password for $user $dbase = getenv('PHP_OCI8_TEST_DB'); // Database connection string $test_drcp = getenv('PHP_OCI8_TEST_DRCP'); - $stress_test = getenv('PHP_OCI8_STRESS_TEST'); if (false !== $test_drcp && 0 == strcasecmp($test_drcp,'TRUE')) { $test_drcp = TRUE; } else { $test_drcp = FALSE; } - if (false !== $stress_test && 0 == strcasecmp($stress_test,'TRUE')) { - $stress_test = TRUE; - } else { - $stress_test = FALSE; - } } else { $user = "system"; $password = "oracle"; $dbase = "localhost/XE"; $test_drcp = FALSE; - $stress_test = FALSE; } /* diff --git a/ext/oci8/tests/error2.phpt b/ext/oci8/tests/error2.phpt index 12eab61a6..48f21f440 100644 --- a/ext/oci8/tests/error2.phpt +++ b/ext/oci8/tests/error2.phpt @@ -4,7 +4,7 @@ Exercise error code for SUCCESS_WITH_INFO <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php diff --git a/ext/oci8/tests/error3.phpt b/ext/oci8/tests/error3.phpt new file mode 100644 index 000000000..8540db250 --- /dev/null +++ b/ext/oci8/tests/error3.phpt @@ -0,0 +1,40 @@ +--TEST-- +Maximum Oracle error length +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +// Assume runtime client version is >= compile time client version +$cv = explode('.', oci_client_version()); +if ($cv[0] < 11 || ($cv[0] == 11 && $cv[1] < 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] < 3)) { + die("skip test works only with Oracle 11.2.0.3 or greater version of Oracle client libraries"); +} +?> +--INI-- +log_errors_max_len=4096 +--FILE-- +<?php + +require(dirname(__FILE__).'/connect.inc'); + +echo "Test 1\n"; + +error_reporting(E_ALL); + +$s = oci_parse($c, "declare +s varchar2(4000); +begin +s := 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBab in %serror3.php on line %d +===DONE=== diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 993198c4d..37f8f3834 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -5,7 +5,7 @@ Test External Authentication errors with oci_connect if (!extension_loaded('oci8')) die ("skip no oci8 extension"); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); require(dirname(__FILE__).'/details.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index d3bee0bfc..f3b517f73 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -3,9 +3,8 @@ Test External Authentication errors with oci_new_connect --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); -require(dirname(__FILE__).'/details.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index e159c50f9..e6685eb17 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -3,9 +3,8 @@ Test External Authentication errors with oci_pconnect --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); -require(dirname(__FILE__).'/details.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index ade79a200..4cd159510 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -4,7 +4,7 @@ Bug #49560 (LOB resource destructor and refcount test) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt index 8041699f9..c218d904f 100644 --- a/ext/oci8/tests/password_new.phpt +++ b/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"; diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt index 3ff726d2b..fdbb1f9e8 100644 --- a/ext/oci8/tests/password_old.phpt +++ b/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"; diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt index 6a9044b1a..9947e15db 100644 --- a/ext/oci8/tests/pecl_bug10194.phpt +++ b/ext/oci8/tests/pecl_bug10194.phpt @@ -4,7 +4,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --INI-- memory_limit=10M diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt index 75632ce47..faf87ab3c 100644 --- a/ext/oci8/tests/pecl_bug10194_blob.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob.phpt @@ -5,7 +5,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only"); -if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --INI-- memory_limit=3M diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt index da7ec592f..45788a41b 100644 --- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt @@ -4,8 +4,8 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes require(dirname(__FILE__).'/skipif.inc'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); -if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE'); ?> --INI-- memory_limit=6M diff --git a/ext/oci8/tests/pecl_bug16035.phpt b/ext/oci8/tests/pecl_bug16035.phpt index 29ff6439d..ddd0038de 100644 --- a/ext/oci8/tests/pecl_bug16035.phpt +++ b/ext/oci8/tests/pecl_bug16035.phpt @@ -10,6 +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"); } +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/pecl_bug16842.phpt b/ext/oci8/tests/pecl_bug16842.phpt index dbf7e6bb8..ca24d0d27 100644 --- a/ext/oci8/tests/pecl_bug16842.phpt +++ b/ext/oci8/tests/pecl_bug16842.phpt @@ -39,7 +39,8 @@ oci_close($c); Test 1 Raises NO_DATA_FOUND -Warning: oci_execute(): OCI_NO_DATA in %s on line 11 +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at line %d in %specl_bug16842.php on line %d bool(false) array(4) { ["code"]=> |