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_sqltchr_1.phpt ('Bind with SQLT_CHR')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table bind_sqltchr_tab",
9:
10:     
"create table bind_sqltchr_tab (
11:         id                number,
12:         varchar2_t10      varchar2(10),
13:         number_t          number,
14:         number_t92        number(9,2))"
15:
16:
);
17:
18:
oci8_test_sql_execute($c$stmtarray);
19:
20: function 
check_col($c$colname$id)
21: {
22:     
$s oci_parse($c"select $colname from bind_sqltchr_tab where id = :id");
23:     
oci_bind_by_name($s":id"$id);
24:     
oci_execute($s);
25:     
oci_fetch_all($s$r);
26:     
var_dump($r);
27: }
28:
29:
// Run Test
30:
31:
echo "\nTEST241 bind SQLT_CHR\n";
32:
33:
$c2 "Hood241";
34:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, varchar2_t10) VALUES (241, :c2)");
35:
oci_bind_by_name($s":c2"$c2, -1SQLT_CHR);
36:
oci_execute($s);
37:
38:
check_col($c'varchar2_t10'241);
39:
40:
41: echo 
"\nTEST242 insert numbers SQLT_CHR\n";
42:
43:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t) VALUES (242, :n1)");
44:
$n1 42;
45:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
46:
oci_execute($s);
47:
48:
check_col($c'number_t'242);
49:
50: echo 
"\nTEST243 insert numbers, SQLT_CHR\n";
51:
52:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t) VALUES (243, :n1)");
53:
$n1 42.69;
54:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
55:
oci_execute($s);
56:
57:
check_col($c'number_t'243);
58:
59: echo 
"\nTEST244 insert numbers with SQLT_CHR\n";
60:
61:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t) VALUES (244, :n1)");
62:
$n1 0;
63:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
64:
oci_execute($s);
65:
66:
check_col($c'number_t'244);
67:
68: echo 
"\nTEST245 insert numbers with SQLT_CHR\n";
69:
70:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t) VALUES (245, :n1)");
71:
$n1 = -23;
72:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
73:
oci_execute($s);
74:
75:
check_col($c'number_t'245);
76:
77: echo 
"\nTEST246 insert numbers\n";
78:
79:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t) VALUES (246, :n1)");
80:
$n1 "-23";
81:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
82:
oci_execute($s);
83:
84:
check_col($c'number_t'246);
85:
86: echo 
"\nTEST247 insert numbers with SQLT_CHR\n";
87:
88:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t) VALUES (247, :n1)");
89:
$n1 "23";
90:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
91:
oci_execute($s);
92:
93:
check_col($c'number_t'247);
94:
95: echo 
"\nTEST248 insert numbers with SQLT_CHR\n";
96:
97:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t92) VALUES (248, :n1)");
98:
$n1 123.56;
99:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
100:
oci_execute($s);
101:
102:
check_col($c'number_t92'248);
103:
104: echo 
"\nTEST249 insert numbers with SQLT_CHR\n";
105:
106:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t92) VALUES (249, :n1)");
107:
$n1 "123.56";
108:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
109:
oci_execute($s);
110:
111:
check_col($c'number_t92'249);
112:
113: echo 
"\nTEST250 insert numbers with SQLT_CHR\n";
114:
115:
$s oci_parse($c"INSERT INTO bind_sqltchr_tab (id, number_t92) VALUES (250, :n1)");
116:
$n1 "";
117:
oci_bind_by_name($s":n1"$n1, -1SQLT_CHR);
118:
oci_execute($s);
119:
120:
check_col($c'number_t92'250);
121:
122:
// Clean up
123:
124:
$stmtarray = array(
125:     
"drop table bind_sqltchr_tab"
126:
);
127:
128:
oci8_test_sql_execute($c$stmtarray);
129:
130:
?>
131:
===DONE===
132:

Expected

TEST241 bind SQLT_CHR
array(1) {
  ["VARCHAR2_T10"]=>
  array(1) {
    [0]=>
    string(7) "Hood241"
  }
}

TEST242 insert numbers SQLT_CHR
array(1) {
  ["NUMBER_T"]=>
  array(1) {
    [0]=>
    string(2) "42"
  }
}

TEST243 insert numbers, SQLT_CHR
array(1) {
  ["NUMBER_T"]=>
  array(1) {
    [0]=>
    string(5) "42.69"
  }
}

TEST244 insert numbers with SQLT_CHR
array(1) {
  ["NUMBER_T"]=>
  array(1) {
    [0]=>
    string(1) "0"
  }
}

TEST245 insert numbers with SQLT_CHR
array(1) {
  ["NUMBER_T"]=>
  array(1) {
    [0]=>
    string(3) "-23"
  }
}

TEST246 insert numbers
array(1) {
  ["NUMBER_T"]=>
  array(1) {
    [0]=>
    string(3) "-23"
  }
}

TEST247 insert numbers with SQLT_CHR
array(1) {
  ["NUMBER_T"]=>
  array(1) {
    [0]=>
    string(2) "23"
  }
}

TEST248 insert numbers with SQLT_CHR
array(1) {
  ["NUMBER_T92"]=>
  array(1) {
    [0]=>
    string(6) "123.56"
  }
}

TEST249 insert numbers with SQLT_CHR
array(1) {
  ["NUMBER_T92"]=>
  array(1) {
    [0]=>
    string(6) "123.56"
  }
}

TEST250 insert numbers with SQLT_CHR
array(1) {
  ["NUMBER_T92"]=>
  array(1) {
    [0]=>
    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:55:56
  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- TEST241 bind SQLT_CHR
002- array(1) {
003-   ["VARCHAR2_T10"]=>
004-   array(1) {
005-     [0]=>
006-     string(7) "Hood241"
007-   }
008- }
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:55:56
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
010- TEST242 insert numbers SQLT_CHR
011- array(1) {
012-   ["NUMBER_T"]=>
013-   array(1) {
014-     [0]=>
015-     string(2) "42"
016-   }
017- }
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
019- TEST243 insert numbers, SQLT_CHR
020- array(1) {
021-   ["NUMBER_T"]=>
022-   array(1) {
023-     [0]=>
024-     string(5) "42.69"
025-   }
026- }
027- 
028- TEST244 insert numbers with SQLT_CHR
029- array(1) {
030-   ["NUMBER_T"]=>
031-   array(1) {
032-     [0]=>
033-     string(1) "0"
034-   }
035- }
036- 
037- TEST245 insert numbers with SQLT_CHR
038- array(1) {
039-   ["NUMBER_T"]=>
040-   array(1) {
041-     [0]=>
042-     string(3) "-23"
043-   }
044- }
045- 
046- TEST246 insert numbers
047- array(1) {
048-   ["NUMBER_T"]=>
049-   array(1) {
050-     [0]=>
051-     string(3) "-23"
052-   }
053- }
054- 
055- TEST247 insert numbers with SQLT_CHR
056- array(1) {
057-   ["NUMBER_T"]=>
058-   array(1) {
059-     [0]=>
060-     string(2) "23"
061-   }
062- }
063- 
064- TEST248 insert numbers with SQLT_CHR
065- array(1) {
066-   ["NUMBER_T92"]=>
067-   array(1) {
068-     [0]=>
069-     string(6) "123.56"
070-   }
071- }
072- 
073- TEST249 insert numbers with SQLT_CHR
074- array(1) {
075-   ["NUMBER_T92"]=>
076-   array(1) {
077-     [0]=>
078-     string(6) "123.56"
079-   }
080- }
081- 
082- TEST250 insert numbers with SQLT_CHR
083- array(1) {
084-   ["NUMBER_T92"]=>
085-   array(1) {
086-     [0]=>
087-     NULL
088-   }
089- }
090- ===DONE===

 

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

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