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/oci8/tests/bug71600.phpt ('Bug #71600 (oci_fetch_all result in segfault when select more than 8 columns)')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:         
5:
// Initialize
6:
7:
$stmtarray = array(
8:          
"create table bug71600_tab (col1 number, col2 number, col3 number, 
9:                                      col4 number, col5 number, col6 number, 
10:                                      col7 number, col8 number, col9 number)"
,
11:          
"insert into bug71600_tab values(1, 2, 3, 4, 5, 6, 7, 8, 9)",
12:          
"insert into bug71600_tab values(11, 12, 13, 14, 15, 16, 17, 18, 19)"
13:
);
14:
15:
oci8_test_sql_execute($c$stmtarray);
16:
17:
// Run test
18:     
19:
$sql "select col1,col2,col3,col4,col5,col6,col7,col8,col9 from bug71600_tab";
20:
21: echo 
"Test 1\n";
22:
$stmt oci_parse($c$sql);
23:
24: echo 
"Executing SELECT statament...\n";
25:
oci_execute($stmt,OCI_DEFAULT);
26:
27: echo 
"Fetching data by columns...\n";
28:
oci_fetch_all($stmt$result);
29:
oci_free_statement($stmt);
30:
31:
$rsRows=(count($result,1)/($rows count($result,0)))-1;
32: echo 
"$rsRows Records Found\n";
33:
$rsCount=0;
34: while(
$rsCount $rsRows)
35: {
36:   
$col1   =$result['COL1'][$rsCount];
37:   
$col9   =$result['COL9'][$rsCount];
38:   echo 
"$rsCount|$col1|$col9\n";
39:   
$rsCount++;
40: }
41:
42: echo 
"Test 2\n";
43:
$stmt oci_parse($c$sql);
44:
45: echo 
"Re-executing SELECT statament...\n";
46:
oci_execute($stmt,OCI_DEFAULT);
47:
48: echo 
"Fetching data by rows...\n";
49:
oci_fetch_all($stmt$result0, -1OCI_FETCHSTATEMENT_BY_ROW);
50:
oci_free_statement($stmt);
51:
52:
$rsRows=count($result,0);
53: echo 
"$rsRows Records Found\n";
54:
$rsCount=0;
55: while(
$rsCount $rsRows)
56: {
57:   
$col1 $result[$rsCount]['COL1'];
58:   
$col9 $result[$rsCount]['COL9'];
59:   echo 
"$rsCount|$col1|$col9\n";
60:   
$rsCount++;
61: }
62:
63:
64:
// Cleanup
65:
66:
$stmtarray = array(
67:     
"drop table bug71600_tab"
68:
);
69:
70:
oci8_test_sql_execute($c$stmtarray);
71:
72:
?>
73:
===DONE===
74:

Expected

Test 1
Executing SELECT statament...
Fetching data by columns...
2 Records Found
0|1|9
1|11|19
Test 2
Re-executing SELECT statament...
Fetching data by rows...
2 Records Found
0|1|9
1|11|19
===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 05:08:20
  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: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
    nt secondary err code: 111
    nt OS err code: 0

Diff

001+ ***********************************************************************
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 05:08:20
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
001- Test 1
002- Executing SELECT statament...
003- Fetching data by columns...
004- 2 Records Found
005- 0|1|9
006- 1|11|19
007- Test 2
008- Re-executing SELECT statament...
009- Fetching data by rows...
010- 2 Records Found
011- 0|1|9
012- 1|11|19
013- ===DONE===
014+     nt main err code: 511
015+     TNS-00511: No listener
016+ 
017+ Fatal error: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
018+     nt secondary err code: 111
019+     nt OS err code: 0

 

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

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