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/dupcolnames.phpt ('SELECT tests with duplicate column anmes')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table dupcolnames_tab1",
9:     
"drop table dupcolnames_tab2",
10:
11:     
"create table dupcolnames_tab1 (c1 number, dupnamecol varchar2(20))",
12:     
"create table dupcolnames_tab2 (c2 number, dupnamecol varchar2(20))",
13:
14:     
"insert into dupcolnames_tab1 (c1, dupnamecol) values (1, 'chris')",
15:     
"insert into dupcolnames_tab2 (c2, dupnamecol) values (2, 'jones')",
16: );
17:
18:
oci8_test_sql_execute($c$stmtarray);
19:
20:
// Run Test
21:
22:
echo "Test 1 - OCI_ASSOC\n";
23:
$s oci_parse($c"select * from dupcolnames_tab1, dupcolnames_tab2");
24:
oci_execute($s);
25: while ((
$r oci_fetch_array($sOCI_ASSOC)) != false) {
26:     
var_dump($r);
27: }
28:
29:
30: echo 
"\nTest 2 - OCI_NUM\n";
31:
$s oci_parse($c"select * from dupcolnames_tab1, dupcolnames_tab2");
32:
oci_execute($s);
33: while ((
$r oci_fetch_array($sOCI_NUM)) != false) {
34:     
var_dump($r);
35: }
36:
37:
38: echo 
"\nTest 3 - OCI_ASSOC+OCI_NUM\n";
39:
$s oci_parse($c"select * from dupcolnames_tab1, dupcolnames_tab2");
40:
oci_execute($s);
41: while ((
$r oci_fetch_array($sOCI_ASSOC+OCI_NUM)) != false) {
42:     
var_dump($r);
43: }
44:
45:
// Clean up
46:
47:
$stmtarray = array(
48:     
"drop table dupcolnames_tab1",
49:     
"drop table dupcolnames_tab2",
50: );
51:
52:
oci8_test_sql_execute($c$stmtarray);
53:
54:
?>
55:
===DONE===
56:

Expected

Test 1 - OCI_ASSOC
array(3) {
  ["C1"]=>
  string(1) "1"
  ["DUPNAMECOL"]=>
  string(5) "jones"
  ["C2"]=>
  string(1) "2"
}

Test 2 - OCI_NUM
array(4) {
  [0]=>
  string(1) "1"
  [1]=>
  string(5) "chris"
  [2]=>
  string(1) "2"
  [3]=>
  string(5) "jones"
}

Test 3 - OCI_ASSOC+OCI_NUM
array(7) {
  [0]=>
  string(1) "1"
  ["C1"]=>
  string(1) "1"
  [1]=>
  string(5) "chris"
  ["DUPNAMECOL"]=>
  string(5) "jones"
  [2]=>
  string(1) "2"
  ["C2"]=>
  string(1) "2"
  [3]=>
  string(5) "jones"
}
===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:33:01
  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)))
001- Test 1 - OCI_ASSOC
002- array(3) {
003-   ["C1"]=>
004-   string(1) "1"
005-   ["DUPNAMECOL"]=>
006-   string(5) "jones"
007-   ["C2"]=>
008-   string(1) "2"
009- }
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:33:01
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
011- Test 2 - OCI_NUM
012- array(4) {
013-   [0]=>
014-   string(1) "1"
015-   [1]=>
016-   string(5) "chris"
017-   [2]=>
018-   string(1) "2"
019-   [3]=>
020-   string(5) "jones"
021- }
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
023- Test 3 - OCI_ASSOC+OCI_NUM
024- array(7) {
025-   [0]=>
026-   string(1) "1"
027-   ["C1"]=>
028-   string(1) "1"
029-   [1]=>
030-   string(5) "chris"
031-   ["DUPNAMECOL"]=>
032-   string(5) "jones"
033-   [2]=>
034-   string(1) "2"
035-   ["C2"]=>
036-   string(1) "2"
037-   [3]=>
038-   string(5) "jones"
039- }
040- ===DONE===

 

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

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