diff --git a/ext/pdo/tests/bug_73234.phpt b/ext/pdo/tests/bug_73234.phpt index 451cc4849c42a..e3e3c0b2b8090 100644 --- a/ext/pdo/tests/bug_73234.phpt +++ b/ext/pdo/tests/bug_73234.phpt @@ -7,6 +7,11 @@ $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); + +$db = PDOTest::factory(); +if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') { + die("xfail PDO::PARAM_NULL is not honored by OCI driver, related with bug #81586"); +} ?> --FILE-- getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') { + die("xfail OCI driver errorInfo is inconsistent with other PDO drivers"); +} ?> --FILE-- exec("drop table pdo_oci_stream_2"); +$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); // Let's use streams + +// Since each column only has one lob descriptor, the last row is +// shown twice because the lob descriptor for each column is reused in +// the stream + +$i = 0; +$j = 9; +$a_val = ord('a'); +foreach($db->query("select data1 as d4_1, data2 as d4_2 from pdo_oci_stream_2 order by id") as $row) { + $a = $row['d4_1']; + $a1 = $row['d4_2']; + + $str1 = stream_get_contents($a); + $str2 = stream_get_contents($a1); + + $str1len = strlen($str1); + $str2len = strlen($str2); + + $b = ord($str1[0]); + $b1 = ord($str2[0]); + + if (($b != ($a_val + $i)) && ($str1len != (4086 + $i)) && + ($b1 != ($a_val + $j)) && ($str2len != (4086 + $j))) { + printf("There is a bug!\n"); + printf("Col1:\n"); + printf("a_val = %d\n", $a_val); + printf("b = %d\n", $b); + printf("i = %d\n", $i); + printf("str1len = %d\n", $str1len); + + printf("Col2:\n"); + printf("a_val = %d\n", $a_val); + printf("b1 = %d\n", $b1); + printf("j = %d\n", $j); + printf("str2len = %d\n", $str1len); + + } + $i++; + if ($i>9) + $i = 0; + $j--; + if ($j<0) + $j = 9; +} +echo "Fetch operation done!\n"; + +/* Cleanup */ +$db->exec("drop table pdo_oci_stream_2"); + ?> --EXPECT-- Inserting 1000 Records ... Done +Fetch operation done! diff --git a/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt b/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt deleted file mode 100644 index de09c4872883b..0000000000000 --- a/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt +++ /dev/null @@ -1,70 +0,0 @@ ---TEST-- -PDO OCI: Fetches 1K records from a table that contains 1 number and 2 LOB columns (stress test) ---SKIPIF-- - ---FILE-- -setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); // Let's use streams - -// Since each column only has one lob descriptor, the last row is -// shown twice because the lob descriptor for each column is reused in -// the stream - -$i = 0; -$j = 9; -$a_val = ord('a'); -foreach($db->query("select data1 as d4_1, data2 as d4_2 from pdo_oci_stream_2 order by id") as $row) { - $a = $row['d4_1']; - $a1 = $row['d4_2']; - - $str1 = stream_get_contents($a); - $str2 = stream_get_contents($a1); - - $str1len = strlen($str1); - $str2len = strlen($str2); - - $b = ord($str1[0]); - $b1 = ord($str2[0]); - - if (($b != ($a_val + $i)) && ($str1len != (4086 + $i)) && - ($b1 != ($a_val + $j)) && ($str2len != (4086 + $j))) { - printf("There is a bug!\n"); - printf("Col1:\n"); - printf("a_val = %d\n", $a_val); - printf("b = %d\n", $b); - printf("i = %d\n", $i); - printf("str1len = %d\n", $str1len); - - printf("Col2:\n"); - printf("a_val = %d\n", $a_val); - printf("b1 = %d\n", $b1); - printf("j = %d\n", $j); - printf("str2len = %d\n", $str1len); - - } - $i++; - if ($i>9) - $i = 0; - $j--; - if ($j<0) - $j = 9; -} -echo "Fetch operation done!\n"; - -/* Cleanup */ -$db->exec("drop table pdo_oci_stream_2"); - -?> ---EXPECT-- -Fetch operation done!