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/edition_1.phpt ('Basic test for setting Oracle 11gR2 "edition" attribute')

Script

1: <?php
2:
3:
/* In 11.2, there can only be one child edition.  So this test will
4:  * fail to create the necessary editions if a child edition exists
5:  * already 
6:  */
7:
8:
$testuser     'testuser_attr_1';  // Used in conn_attr.inc
9:
$testpassword 'testuser'
10:
11: require(
dirname(__FILE__)."/conn_attr.inc");
12:
13: function 
select_fn($conn) {
14:     
$s oci_parse($conn,"select * from view_ed");
15:     
oci_execute($s);
16:     while (
$row oci_fetch_row($s)) {
17:         
var_dump($row);
18:     }
19: }
20:
/* Create a editon MYEDITION 
21:    create a view view_ed in MYEDITION1.
22:    create the same view 'view_ed' with a different definition in MYEDITION.
23:    select from both the editions and verify the contents. */
24:
25:
set_edit_attr('MYEDITION');
26:
$conn oci_connect($testuser,$testpassword,$dbase); 
27: if (
$conn === false) {
28:     
$m oci_error();
29:     die(
"Error:" $m['message']);
30: }
31:     
32:
$stmtarray = array(
33:     
"drop table edit_tab",
34:     
"create table edit_tab (name varchar2(10),age number,job varchar2(50), salary number)",
35:     
"insert into edit_tab values('mike',30,'Senior engineer',200)",
36:     
"insert into edit_tab values('juan',25,'engineer',100)",
37:     
"create or replace editioning view view_ed as select name,age,job from edit_tab",
38: );
39:
40:
oci8_test_sql_execute($conn$stmtarray);
41:
42:
// Check the current edition of the DB and the contents of view_ed.
43:
get_edit_attr($conn);
44:
select_fn($conn);
45:
46:
// Create a different version of view_ed in MYEDITION1.
47:
set_edit_attr('MYEDITION1');
48:
$conn2 oci_new_connect($testuser,$testpassword,$dbase); 
49:
$stmt "create or replace editioning view view_ed as select name,age,job,salary from edit_tab";
50:
$s oci_parse($conn2$stmt);
51:
oci_execute($s);
52:
53:
// Check the current edition of the DB and the contents of view_ed.
54:
get_edit_attr($conn2);
55:
select_fn($conn2);
56:
57:
// Verify the contents in MYEDITION EDITION.
58:
echo "version of view_ed in MYEDITION \n";
59:
get_edit_attr($conn);
60:
select_fn($conn);
61:
62:
clean_up($c);
63:
64:
oci_close($conn);
65:
oci_close($conn2);
66: echo 
"Done\n";
67:
68:
?>
69:

Expected

The value of edition has been successfully set
The value of current EDITION is MYEDITION
array(3) {
  [0]=>
  string(%d) "mike"
  [1]=>
  string(%d) "30"
  [2]=>
  string(%d) "Senior engineer"
}
array(3) {
  [0]=>
  string(%d) "juan"
  [1]=>
  string(%d) "25"
  [2]=>
  string(%d) "engineer"
}
 The value of edition has been successfully set
The value of current EDITION is MYEDITION1
array(4) {
  [0]=>
  string(%d) "mike"
  [1]=>
  string(%d) "30"
  [2]=>
  string(%d) "Senior engineer"
  [3]=>
  string(%d) "200"
}
array(4) {
  [0]=>
  string(%d) "juan"
  [1]=>
  string(%d) "25"
  [2]=>
  string(%d) "engineer"
  [3]=>
  string(%d) "100"
}
version of view_ed in MYEDITION 
The value of current EDITION is MYEDITION
array(3) {
  [0]=>
  string(%d) "mike"
  [1]=>
  string(%d) "30"
  [2]=>
  string(%d) "Senior engineer"
}
array(3) {
  [0]=>
  string(%d) "juan"
  [1]=>
  string(%d) "25"
  [2]=>
  string(%d) "engineer"
}
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:16
  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:33:16
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: 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
001- The value of edition has been successfully set
002- The value of current EDITION is MYEDITION
003- array(3) {
004-   [0]=>
005-   string(%d) "mike"
006-   [1]=>
007-   string(%d) "30"
008-   [2]=>
009-   string(%d) "Senior engineer"
010- }
011- array(3) {
012-   [0]=>
013-   string(%d) "juan"
014-   [1]=>
015-   string(%d) "25"
016-   [2]=>
017-   string(%d) "engineer"
018- }
019-  The value of edition has been successfully set
020- The value of current EDITION is MYEDITION1
021- array(4) {
022-   [0]=>
023-   string(%d) "mike"
024-   [1]=>
025-   string(%d) "30"
026-   [2]=>
027-   string(%d) "Senior engineer"
028-   [3]=>
029-   string(%d) "200"
030- }
031- array(4) {
032-   [0]=>
033-   string(%d) "juan"
034-   [1]=>
035-   string(%d) "25"
036-   [2]=>
037-   string(%d) "engineer"
038-   [3]=>
039-   string(%d) "100"
040- }
041- version of view_ed in MYEDITION 
042- The value of current EDITION is MYEDITION
043- array(3) {
044-   [0]=>
045-   string(%d) "mike"
046-   [1]=>
047-   string(%d) "30"
048-   [2]=>
049-   string(%d) "Senior engineer"
050- }
051- array(3) {
052-   [0]=>
053-   string(%d) "juan"
054-   [1]=>
055-   string(%d) "25"
056-   [2]=>
057-   string(%d) "engineer"
058- }
059- Done

 

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

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