From: Christopher Jones Date: Fri, 26 Mar 2010 19:38:26 +0000 (+0000) Subject: Fix #51220 by adding . Also improve reliability for tests using undefined behavior. X-Git-Tag: php-5.4.0alpha1~191^2~1837 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=675ae35a8cfa209a7bf0b106a6eb71ef7bf48544;p=php Fix #51220 by adding . Also improve reliability for tests using undefined behavior. --- diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index 36574dbfbb..71cccbfc50 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -5,14 +5,17 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- +--FILE-- + +--EXPECT-- +*** Non-null Data Tests against CHAR*** +Test 1.1: Type: default. Length: default + Querying: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :abc : + :: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :abc : + :: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :abc : + :: + + +*** NULL data tests against CHAR *** +Test 2.1: Type: default. Length: default + Querying: +Test 2.2: Type: AFC. Length: default + Querying: +Test 2.3: Type: AFC: Length: 0 + Querying: +Test 2.4: Type: AFC: Length: strlen + Querying: +Test 2.5: Type: AFC. Length: strlen-1 + Querying: +Test 2.6: Type: AFC. Length: strlen+1 + Querying: + + +*** Non-null Data Tests against VARCHAR2*** +Test 3.1: Type: default. Length: default + Querying: + :2: + :: + :abc: +Test 3.2: Type: AFC. Length: default + Querying: + :2: + :: + :abc: +Test 3.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 3.4: Type: AFC: Length: strlen + Querying: + :2: + :: + :abc: +Test 3.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 3.6: Type: AFC. Length: strlen+1 + Querying: + :2: + :: + :abc: + + +*** NULL data tests against VARCHAR2 *** +Test 4.1: Type: default. Length: default + Querying: +Test 4.2: Type: AFC. Length: default + Querying: +Test 4.3: Type: AFC: Length: 0 + Querying: +Test 4.4: Type: AFC: Length: strlen + Querying: +Test 4.5: Type: AFC. Length: strlen-1 + Querying: +Test 4.6: Type: AFC. Length: strlen+1 + Querying: +Done diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt index f0f41663f5..6c7dbafcc5 100644 --- a/ext/oci8/tests/bind_char_2.phpt +++ b/ext/oci8/tests/bind_char_2.phpt @@ -5,14 +5,17 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- +--FILE-- + +--EXPECT-- +Test 1.1: Type: default. Length: default + Querying: + :1: + :2008-04-20: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :2008-04-20: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :2008-04-20: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :2008-04-20: +Done diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt index 6d1b31150f..8d4e95f6bf 100644 --- a/ext/oci8/tests/bind_char_3.phpt +++ b/ext/oci8/tests/bind_char_3.phpt @@ -5,14 +5,17 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 11gR2 databases"); } ?> --FILE-- +--FILE-- + +--EXPECTF-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(3) "abc" +string(10) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +string(3) "abc" +string(3) "abc" +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +string(3) "abc" +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +string(3) "abc" +string(4) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +string(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt index 7377604b0c..40221b266f 100644 --- a/ext/oci8/tests/bind_char_4.phpt +++ b/ext/oci8/tests/bind_char_4.phpt @@ -5,14 +5,17 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- +--FILE-- + +--EXPECTF-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(3) "abc" +string(10) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +string(3) "abc" +string(3) "abc" +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +string(3) "abc" +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +string(3) "abc" +string(4) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +string(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done diff --git a/ext/oci8/tests/bind_long.phpt b/ext/oci8/tests/bind_long.phpt index 065a5f1439..ba6bd4d044 100644 --- a/ext/oci8/tests/bind_long.phpt +++ b/ext/oci8/tests/bind_long.phpt @@ -5,7 +5,10 @@ bind LONG field --FILE-- +--FILE-- + +--EXPECT-- +string(1) "1" +string(1) "2" +string(1) "3" +string(1) "4" +string(1) "5" +string(1) "6" +string(1) "7" +string(1) "8" +string(1) "9" +string(2) "10" +string(2) "11" +string(2) "12" +string(2) "13" +string(2) "14" +string(2) "15" +string(2) "16" +string(2) "17" +string(2) "18" +string(2) "19" +string(2) "20" +string(2) "21" +string(2) "22" +string(2) "23" +string(2) "24" +string(2) "25" +string(2) "26" +string(2) "27" +string(2) "28" +string(2) "29" +string(2) "30" +string(2) "31" +string(2) "32" +string(2) "33" +string(2) "34" +string(2) "35" +string(2) "36" +string(2) "37" +string(2) "38" +string(2) "39" +string(2) "40" +string(2) "41" +string(2) "42" +string(2) "43" +string(2) "44" +string(2) "45" +string(2) "46" +string(2) "47" +string(2) "48" +string(2) "49" +string(2) "50" +string(2) "51" +string(2) "52" +string(2) "53" +string(2) "54" +string(2) "55" +string(2) "56" +string(2) "57" +string(2) "58" +string(2) "59" +string(2) "60" +string(2) "61" +string(2) "62" +string(2) "63" +string(2) "64" +string(2) "65" +string(2) "66" +string(2) "67" +string(2) "68" +string(2) "69" +string(2) "70" +string(2) "71" +string(2) "72" +string(2) "73" +string(2) "74" +string(2) "75" +string(2) "76" +string(2) "77" +string(2) "78" +string(2) "79" +string(2) "80" +string(2) "81" +string(2) "82" +string(2) "83" +string(2) "84" +string(2) "85" +string(2) "86" +string(2) "87" +string(2) "88" +string(2) "89" +string(2) "90" +string(2) "91" +string(2) "92" +string(2) "93" +string(2) "94" +string(2) "95" +string(2) "96" +string(2) "97" +string(2) "98" +string(2) "99" +string(3) "100" +string(3) "101" +string(3) "102" +string(3) "103" +string(3) "104" +string(3) "105" +string(3) "106" +string(3) "107" +string(3) "108" +string(3) "109" +string(3) "110" +string(3) "111" +string(3) "112" +string(3) "113" +string(3) "114" +string(3) "115" +string(3) "116" +string(3) "117" +string(3) "118" +string(3) "119" +string(3) "120" +string(3) "121" +string(3) "122" +string(3) "123" +string(3) "124" +string(3) "125" +string(3) "126" +string(3) "127" +string(3) "128" +string(3) "129" +string(3) "130" +string(3) "131" +string(3) "132" +string(3) "133" +string(3) "134" +string(3) "135" +string(3) "136" +string(3) "137" +string(3) "138" +string(3) "139" +string(3) "140" +string(3) "141" +string(3) "142" +string(3) "143" +string(3) "144" +string(3) "145" +string(3) "146" +string(3) "147" +string(3) "148" +string(3) "149" +string(3) "150" +string(3) "151" +string(3) "152" +string(3) "153" +string(3) "154" +string(3) "155" +string(3) "156" +string(3) "157" +string(3) "158" +string(3) "159" +string(3) "160" +string(3) "161" +string(3) "162" +string(3) "163" +string(3) "164" +string(3) "165" +string(3) "166" +string(3) "167" +string(3) "168" +string(3) "169" +string(3) "170" +string(3) "171" +string(3) "172" +string(3) "173" +string(3) "174" +string(3) "175" +string(3) "176" +string(3) "177" +string(3) "178" +string(3) "179" +string(3) "180" +string(3) "181" +string(3) "182" +string(3) "183" +string(3) "184" +string(3) "185" +string(3) "186" +string(3) "187" +string(3) "188" +string(3) "189" +string(3) "190" +string(3) "191" +string(3) "192" +string(3) "193" +string(3) "194" +string(3) "195" +string(3) "196" +string(3) "197" +string(3) "198" +string(3) "199" +Done \ No newline at end of file diff --git a/ext/oci8/tests/bug27303.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt similarity index 92% rename from ext/oci8/tests/bug27303.phpt rename to ext/oci8/tests/bug27303_1_11gR1.phpt index 4dce84463f..fe5c17c3ee 100644 --- a/ext/oci8/tests/bug27303.phpt +++ b/ext/oci8/tests/bug27303_1_11gR1.phpt @@ -5,9 +5,9 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 11\.1\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 11gR1 database"); } ?> --FILE-- @@ -27,15 +27,13 @@ foreach ($create_st as $statement) { } define('MYLIMIT', 200); -define('INITMYBV', 11); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; $stid = OCIParse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -//$mybv = INITMYBV; // Uncomment this for the 2nd test only -$r = OCIBindByName($stid, ':MYBV', $mybv /*, 5 */); // Uncomment this for the 3rd test only +$r = OCIBindByName($stid, ':MYBV', $mybv); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index 63200ed52e..44b9ce6c61 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -5,14 +5,17 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 database"); } ?> --FILE-- +--FILE-- + +--EXPECT-- +string(1) "1" +string(1) "2" +string(1) "3" +string(1) "4" +string(1) "5" +string(1) "6" +string(1) "7" +string(1) "8" +string(1) "9" +string(2) "10" +string(2) "11" +string(2) "12" +string(2) "13" +string(2) "14" +string(2) "15" +string(2) "16" +string(2) "17" +string(2) "18" +string(2) "19" +string(2) "20" +string(2) "21" +string(2) "22" +string(2) "23" +string(2) "24" +string(2) "25" +string(2) "26" +string(2) "27" +string(2) "28" +string(2) "29" +string(2) "30" +string(2) "31" +string(2) "32" +string(2) "33" +string(2) "34" +string(2) "35" +string(2) "36" +string(2) "37" +string(2) "38" +string(2) "39" +string(2) "40" +string(2) "41" +string(2) "42" +string(2) "43" +string(2) "44" +string(2) "45" +string(2) "46" +string(2) "47" +string(2) "48" +string(2) "49" +string(2) "50" +string(2) "51" +string(2) "52" +string(2) "53" +string(2) "54" +string(2) "55" +string(2) "56" +string(2) "57" +string(2) "58" +string(2) "59" +string(2) "60" +string(2) "61" +string(2) "62" +string(2) "63" +string(2) "64" +string(2) "65" +string(2) "66" +string(2) "67" +string(2) "68" +string(2) "69" +string(2) "70" +string(2) "71" +string(2) "72" +string(2) "73" +string(2) "74" +string(2) "75" +string(2) "76" +string(2) "77" +string(2) "78" +string(2) "79" +string(2) "80" +string(2) "81" +string(2) "82" +string(2) "83" +string(2) "84" +string(2) "85" +string(2) "86" +string(2) "87" +string(2) "88" +string(2) "89" +string(2) "90" +string(2) "91" +string(2) "92" +string(2) "93" +string(2) "94" +string(2) "95" +string(2) "96" +string(2) "97" +string(2) "98" +string(2) "99" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +Done diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt index f290010f15..6395388471 100644 --- a/ext/oci8/tests/bug27303_3.phpt +++ b/ext/oci8/tests/bug27303_3.phpt @@ -26,8 +26,8 @@ $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) $stid = OCIParse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -$mybv = INITMYBV; // Uncomment this for the 2nd test only -$r = OCIBindByName($stid, ':MYBV', $mybv, 5, SQLT_INT); // Uncomment this for the 3rd test only +$mybv = INITMYBV; +$r = OCIBindByName($stid, ':MYBV', $mybv, 5, SQLT_INT); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index 031f0d1e12..3c35c65b77 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/ext/oci8/tests/bug27303_4.phpt @@ -5,14 +5,17 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- +--FILE-- + +--EXPECT-- +string(1) "1" +string(1) "2" +string(1) "3" +string(1) "4" +string(1) "5" +string(1) "6" +string(1) "7" +string(1) "8" +string(1) "9" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +Done diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt index d6c2978635..eee21c3aef 100644 --- a/ext/oci8/tests/bug44113.phpt +++ b/ext/oci8/tests/bug44113.phpt @@ -1,7 +1,11 @@ --TEST-- Bug #44113 (New collection creation can fail with OCI-22303) --SKIPIF-- - + --FILE-- --EXPECTF-- First Insert -Could not execute: ORA-02290: check constraint (SYSTEM.COMMIT_002_TAB_CHECK_X) violated +Could not execute: ORA-02290: %s (SYSTEM.COMMIT_002_TAB_CHECK_X) %s Second Insert -Warning: oci_commit(): ORA-02091: transaction rolled back +Warning: oci_commit(): ORA-02091: %s ORA-02290: %s (SYSTEM.COMMIT_002_TAB_CHECK_Y) %s in %scommit_002.php on line %d -Could not commit: ORA-02091: transaction rolled back +Could not commit: ORA-02091: %s ORA-02290: %s (SYSTEM.COMMIT_002_TAB_CHECK_Y) %s ===DONE=== diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index 2ef2673fd1..9f55f53263 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -5,6 +5,7 @@ Set and get of connection attributes with errors. 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 output might vary with DRCP"); +if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); $sv = oci_server_version($c); $sv = preg_match('/Release 1[012]\./', $sv, $matches); diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc index 75a136ce34..922b8c4f49 100644 --- a/ext/oci8/tests/details.inc +++ b/ext/oci8/tests/details.inc @@ -12,6 +12,9 @@ * 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. */ if (file_exists(dirname(__FILE__)."/details_local.inc")) { @@ -33,12 +36,19 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) { } else { $oracle_on_localhost = FALSE; } + $stress_test = getenv('PHP_OCI8_STRESS_TEST'); + if (false !== $stress_test && 0 == strcasecmp($stress_test,'TRUE')) { + $stress_test = TRUE; + } else { + $stress_test = FALSE; + } } else { $user = "system"; $password = "oracle"; $dbase = "localhost/XE"; $oracle_on_localhost = TRUE; $test_drcp = FALSE; + $stress_test = FALSE; } /* diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 30250ec243..993198c4de 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -4,6 +4,8 @@ Test External Authentication errors with oci_connect --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index d648eef08b..d3bee0bfc3 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -4,6 +4,8 @@ Test External Authentication errors with oci_new_connect --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 021492f765..e159c50f90 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -4,6 +4,8 @@ Test External Authentication errors with oci_pconnect --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index 5ae2d45ebc..0280ef6de8 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -1,7 +1,10 @@ --TEST-- Bug #49560 (LOB resource destructor and refcount test) --SKIPIF-- - + --FILE--