PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_oci/tests/pdo_oci_stream_2b.phpt ('PDO OCI: Fetches 10K records from a table that contains 1 number and 2 LOB columns (stress test)')

Script

1: <?php
2:
3:
// !! Note: uses data inserted in pdo_oci_stream_2a.phpt !!
4:
5:
require('ext/pdo/tests/pdo_test.inc');
6:
$db PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
7:
8:
$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHESfalse);  // Let's use streams
9:
10: // Since each column only has one lob descriptor, the last row is
11: // shown twice because the lob descriptor for each column is reused in
12: // the stream
13:
14:
$i 0;
15:
$j 9;
16:
$a_val ord('a');
17: foreach(
$db->query("select data1 as d4_1, data2 as d4_2 from pdo_oci_stream_2 order by id") as $row) {
18:     
$a $row['d4_1'];
19:     
$a1 $row['d4_2'];
20:     
21:     
$str1 stream_get_contents($a);
22:     
$str2 stream_get_contents($a1);
23:     
24:     
$str1len strlen($str1);
25:     
$str2len strlen($str2);
26:     
27:     
$b ord($str1[0]);
28:     
$b1 ord($str2[0]);
29:     
30:     if ((
$b != ($a_val $i)) && ($str1len != (4086 $i)) &&
31:         (
$b1 != ($a_val $j)) && ($str2len != (4086 $j))) {
32:         
printf("There is a bug!\n");
33:         
printf("Col1:\n");
34:         
printf("a_val = %d\n"$a_val);
35:         
printf("b     = %d\n"$b);
36:         
printf("i     = %d\n"$i);
37:         
printf("str1len = %d\n"$str1len);
38:         
39:         
printf("Col2:\n");
40:         
printf("a_val = %d\n"$a_val);
41:         
printf("b1    = %d\n"$b1);
42:         
printf("j     = %d\n"$j);
43:         
printf("str2len = %d\n"$str1len);
44:         
45:     }
46:     
$i++;
47:     if (
$i>9)
48:         
$i 0;
49:     
$j--;
50:     if (
$j<0)
51:         
$j 9;
52: }
53: echo 
"Fetch operation done!\n";
54:
55:
/* Cleanup */
56:
$db->exec("drop table pdo_oci_stream_2");
57:
58:
?>
59:

Expected

Fetch operation done!

Output

***********************************************************************
Fatal NI connect error 12541, connecting to:
 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))

  VERSION INFORMATION:
	TNS for Linux: Version 11.2.0.2.0 - Beta
	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
  Time: 17-JUN-2018 09:54:33
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12541
    TNS-12541: TNS:no listener
    ns secondary err code: 12560
    nt main err code: 511
    TNS-00511: No listener

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: pdo_oci_handle_factory: ORA-12541: TNS:no listener
 (/var/php_gcov/PHP_HEAD/ext/pdo_oci/oci_driver.c:634) in /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc:35
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc(35): PDO->__construct('oci:dbname=//lo...', 'system', 'oracle', NULL)
#1 /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc(73): PDOTest::factory()
#2 /var/php_gcov/PHP_HEAD/ext/pdo_oci/tests/pdo_oci_stream_2b.php(6): PDOTest::test_factory('ext/pdo_oci/tes...')
#3 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc on line 35
    nt secondary err code: 111
    nt OS err code: 0

Diff

001+ ***********************************************************************
001- Fetch operation done!
002+ Fatal NI connect error 12541, connecting to:
003+  (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
004+ 
005+   VERSION INFORMATION:
006+ 	TNS for Linux: Version 11.2.0.2.0 - Beta
007+ 	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
008+   Time: 17-JUN-2018 09:54:33
009+   Tracing not turned on.
010+   Tns error struct:
011+     ns main err code: 12541
012+     TNS-12541: TNS:no listener
013+     ns secondary err code: 12560
014+     nt main err code: 511
015+     TNS-00511: No listener
016+ 
017+ Fatal error: Uncaught PDOException: SQLSTATE[HY000]: pdo_oci_handle_factory: ORA-12541: TNS:no listener
018+  (/var/php_gcov/PHP_HEAD/ext/pdo_oci/oci_driver.c:634) in /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc:35
019+ Stack trace:
020+ #0 /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc(35): PDO->__construct('oci:dbname=//lo...', 'system', 'oracle', NULL)
021+ #1 /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc(73): PDOTest::factory()
022+ #2 /var/php_gcov/PHP_HEAD/ext/pdo_oci/tests/pdo_oci_stream_2b.php(6): PDOTest::test_factory('ext/pdo_oci/tes...')
023+ #3 {main}
024+   thrown in /var/php_gcov/PHP_HEAD/ext/pdo/tests/pdo_test.inc on line 35
025+     nt secondary err code: 111
026+     nt OS err code: 0

 

Generated at Mon, 18 Jun 2018 17:33:50 +0000 (24 hours ago)

Copyright © 2005-2018 The PHP Group
All rights reserved.