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/bind_empty.phpt ('binding empty values')

Script

1: <?php
2:
3:
require dirname(__FILE__).'/connect.inc';
4:
5:
$drop "DROP table bind_empty_tab";
6:
$statement oci_parse($c$drop);
7: @
oci_execute($statement);
8:
9:
$create "CREATE table bind_empty_tab(name VARCHAR(10))";
10:
$statement oci_parse($c$create);
11:
oci_execute($statement);
12:
13:
14: echo 
"Test 1\n";
15:
16:
$name null;
17:
$stmt oci_parse($c"UPDATE bind_empty_tab SET name=:name");
18:
oci_bind_by_name($stmt":name"$name);
19:
20:
var_dump(oci_execute($stmt));
21:
22: echo 
"Test 2\n";
23:
24:
$name "";
25:
$stmt oci_parse($c"UPDATE bind_empty_tab SET name=:name");
26:
oci_bind_by_name($stmt":name"$name);
27:
28:
var_dump(oci_execute($stmt));
29:
30: echo 
"Test 3\n";
31:
32:
$stmt oci_parse($c"INSERT INTO bind_empty_tab (NAME) VALUES ('abc')");
33:
$res oci_execute($stmt);
34:
35:
$stmt oci_parse($c"INSERT INTO bind_empty_tab (NAME) VALUES ('def')");
36:
$res oci_execute($stmt);
37:
38:
$name null;
39:
$stmt oci_parse($c"UPDATE bind_empty_tab SET name=:name WHERE NAME = 'abc'");
40:
oci_bind_by_name($stmt":name"$name);
41:
42:
var_dump(oci_execute($stmt));
43:
44:
$stid oci_parse($c"select * from bind_empty_tab order by 1");
45:
oci_execute($stid);
46:
oci_fetch_all($stid$res);
47:
var_dump($res);
48:
49: echo 
"Test 4\n";
50:
51:
$name "";
52:
$stmt oci_parse($c"UPDATE bind_empty_tab SET name=:name WHERE NAME = 'def'");
53:
oci_bind_by_name($stmt":name"$name);
54:
55:
var_dump(oci_execute($stmt));
56:
57:
$stid oci_parse($c"select * from bind_empty_tab order by 1");
58:
oci_execute($stid);
59:
oci_fetch_all($stid$res);
60:
var_dump($res);
61:
62: echo 
"Test 5\n";
63:
64:
$av $bv 'old';
65:
$s oci_parse($c"begin :bv := null; end; ");
66:
oci_bind_by_name($s":bv"$bv);
67:
oci_execute($s);
68:
var_dump($av);
69:
var_dump($bv);
70:
71: echo 
"Test 6\n";
72:
73:
$av $bv null;
74:
$s oci_parse($c"begin :bv := null; end; ");
75:
oci_bind_by_name($s":bv"$bv);
76:
oci_execute($s);
77:
var_dump($av);
78:
var_dump($bv);
79:
80:
// Clean up
81:
82:
$drop "DROP table bind_empty_tab";
83:
$statement oci_parse($c$drop);
84: @
oci_execute($statement);
85:
86:
?>
87:
===DONE===
88:

Expected

Test 1
bool(true)
Test 2
bool(true)
Test 3
bool(true)
array(1) {
  ["NAME"]=>
  array(2) {
    [0]=>
    string(3) "def"
    [1]=>
    NULL
  }
}
Test 4
bool(true)
array(1) {
  ["NAME"]=>
  array(2) {
    [0]=>
    NULL
    [1]=>
    NULL
  }
}
Test 5
string(3) "old"
NULL
Test 6
NULL
NULL
===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 04:53:12
  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 04:53:12
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- Test 1
002- bool(true)
003- Test 2
004- bool(true)
005- Test 3
006- bool(true)
007- array(1) {
008-   ["NAME"]=>
009-   array(2) {
010-     [0]=>
011-     string(3) "def"
012-     [1]=>
013-     NULL
014-   }
015- }
016- Test 4
017- bool(true)
018- array(1) {
019-   ["NAME"]=>
020-   array(2) {
021-     [0]=>
022-     NULL
023-     [1]=>
024-     NULL
025-   }
026- }
027- Test 5
028- string(3) "old"
029- NULL
030- Test 6
031- NULL
032- NULL
033- ===DONE===

 

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

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