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/pecl_bug16842.phpt ('PECL Bug #16842 (NO_DATA_FOUND exception is a warning)')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Run Test
6:
7:
echo "Test 1\n";
8:
9: echo 
"Raises NO_DATA_FOUND\n";
10:
$s oci_parse($c'begin raise NO_DATA_FOUND; end;');
11:
$e oci_execute($s);
12:
var_dump($e);
13:
var_dump(oci_error($s));
14:
15: echo 
"Test 2\n";
16:
17: echo 
"Raises ZERO_DIVIDE\n";
18:
$s oci_parse($c'begin raise ZERO_DIVIDE; end;');
19:
$e oci_execute($s);
20:
var_dump($e);
21:
var_dump(oci_error($s));
22:
23:
oci_close($c);
24:
25:
?>
26:
===DONE===
27:

Expected

Test 1
Raises NO_DATA_FOUND

Warning: oci_execute(): ORA-01403: %s
ORA-06512: at line %d in %specl_bug16842.php on line %d
bool(false)
array(4) {
  ["code"]=>
  int(1403)
  ["message"]=>
  string(%d) "ORA-01403: %s
ORA-06512: at line 1"
  ["offset"]=>
  int(0)
  ["sqltext"]=>
  string(31) "begin raise NO_DATA_FOUND; end;"
}
Test 2
Raises ZERO_DIVIDE

Warning: oci_execute(): ORA-01476: %s
ORA-06512: at line 1 in %s on line 19
bool(false)
array(4) {
  ["code"]=>
  int(1476)
  ["message"]=>
  string(%d) "ORA-01476: %s
ORA-06512: at line 1"
  ["offset"]=>
  int(0)
  ["sqltext"]=>
  string(29) "begin raise ZERO_DIVIDE; end;"
}
===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 06:06:54
  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
    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
002- Raises NO_DATA_FOUND
004- Warning: oci_execute(): ORA-01403: %s
005- ORA-06512: at line %d in %specl_bug16842.php on line %d
006- bool(false)
007- array(4) {
008-   ["code"]=>
009-   int(1403)
010-   ["message"]=>
011-   string(%d) "ORA-01403: %s
012- ORA-06512: at line 1"
013-   ["offset"]=>
014-   int(0)
015-   ["sqltext"]=>
016-   string(31) "begin raise NO_DATA_FOUND; end;"
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 06:06:54
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+     nt secondary err code: 111
017+     nt OS err code: 0
017- }
018- Test 2
019- Raises ZERO_DIVIDE
020- 
021- Warning: oci_execute(): ORA-01476: %s
022- ORA-06512: at line 1 in %s on line 19
023- bool(false)
024- array(4) {
025-   ["code"]=>
026-   int(1476)
027-   ["message"]=>
028-   string(%d) "ORA-01476: %s
029- ORA-06512: at line 1"
030-   ["offset"]=>
031-   int(0)
032-   ["sqltext"]=>
033-   string(29) "begin raise ZERO_DIVIDE; end;"
034- }
035- ===DONE===

 

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

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