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_sqltint.phpt ('Bind with SQLT_INT')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table bind_sqltint_tab",
9:
10:     
"create table bind_sqltint_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_sqltint_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 "\nTEST141 wrong bind type SQLT_INT\n";
32:
33:
$c2 "Hood141";
34:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, varchar2_t10) VALUES (141, :c2)");
35:
oci_bind_by_name($s":c2"$c2, -1SQLT_INT);
36:
oci_execute($s);
37:
38:
check_col($c'varchar2_t10'141);
39:
40: echo 
"\nTEST142 insert numbers SQLT_INT\n";
41:
42:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t) VALUES (142, :n1)");
43:
$n1 42;
44:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
45:
oci_execute($s);
46:
47:
check_col($c'number_t'142);
48:
49: echo 
"\nTEST143 insert numbers, SQLT_INT\n";
50:
51:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t) VALUES (143, :n1)");
52:
$n1 42.69;
53:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
54:
oci_execute($s);
55:
56:
check_col($c'number_t'143);
57:
58: echo 
"\nTEST144 insert numbers with SQLT_INT\n";
59:
60:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t) VALUES (144, :n1)");
61:
$n1 0;
62:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
63:
oci_execute($s);
64:
65:
check_col($c'number_t'144);
66:
67: echo 
"\nTEST145 insert numbers with SQLT_INT\n";
68:
69:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t) VALUES (145, :n1)");
70:
$n1 = -23;
71:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
72:
oci_execute($s);
73:
74:
check_col($c'number_t'145);
75:
76: echo 
"\nTEST146 insert numbers\n";
77:
78:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t) VALUES (146, :n1)");
79:
$n1 "-23";
80:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
81:
oci_execute($s);
82:
83:
check_col($c'number_t'146);
84:
85: echo 
"\nTEST147 insert numbers with SQLT_INT\n";
86:
87:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t) VALUES (147, :n1)");
88:
$n1 "23";
89:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
90:
oci_execute($s);
91:
92:
check_col($c'number_t'147);
93:
94: echo 
"\nTEST148 insert numbers with SQLT_INT\n";
95:
96:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t92) VALUES (148, :n1)");
97:
$n1 123.56;
98:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
99:
oci_execute($s);
100:
101:
check_col($c'number_t92'148);
102:
103: echo 
"\nTEST149 insert numbers with SQLT_INT\n";
104:
105:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t92) VALUES (149, :n1)");
106:
$n1 "123.56";
107:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
108:
oci_execute($s);
109:
110:
check_col($c'number_t92'149);
111:
112: echo 
"\nTEST150 insert numbers with SQLT_INT\n";
113:
114:
$s oci_parse($c"INSERT INTO bind_sqltint_tab (id, number_t92) VALUES (150, :n1)");
115:
$n1 "";
116:
oci_bind_by_name($s":n1"$n1, -1SQLT_INT);
117:
oci_execute($s);
118:
119:
check_col($c'number_t92'150);
120:
121: echo 
"\nTEST151 - 159 Initialization tests\n";
122:
123:
$s oci_parse($c"begin :p2 := :p1; end;");
124: unset(
$p1);
125: unset(
$p2);
126:
oci_bind_by_name($s":p1"$p110);
127:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
128:
oci_execute($s);
129:
var_dump($p2);
130:
131: echo 
"\nTEST152\n";
132:
133: unset(
$p1);
134:
$p2 null;
135:
oci_bind_by_name($s":p1"$p110);
136:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
137:
oci_execute($s);
138:
var_dump($p2);
139:
140: echo 
"\nTEST153\n";
141:
142: unset(
$p1);
143:
$p2 1111;
144:
oci_bind_by_name($s":p1"$p110);
145:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
146:
oci_execute($s);
147:
var_dump($p2);
148:
149: echo 
"\nTEST154\n";
150:
151:
$p1 null;
152: unset(
$p2);
153:
oci_bind_by_name($s":p1"$p110);
154:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
155:
oci_execute($s);
156:
var_dump($p2);
157:
158: echo 
"\nTEST155\n";
159:
160:
$p1 null;
161:
$p2 null;
162:
oci_bind_by_name($s":p1"$p110);
163:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
164:
oci_execute($s);
165:
var_dump($p2);
166:
167: echo 
"\nTEST156\n";
168:
169:
$p1 null;
170:
$p2 2222;
171:
oci_bind_by_name($s":p1"$p110);
172:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
173:
oci_execute($s);
174:
var_dump($p2);
175:
176: echo 
"\nTEST157\n";
177:
178:
$p1 3333;
179: unset(
$p2);
180:
oci_bind_by_name($s":p1"$p110);
181:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
182:
oci_execute($s);
183:
var_dump($p2);
184:
185: echo 
"\nTEST158\n";
186:
187:
$p1 4444;
188:
$p2 null;
189:
oci_bind_by_name($s":p1"$p110);
190:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
191:
oci_execute($s);
192:
var_dump($p2);
193:
194: echo 
"\nTEST159\n";
195:
196:
$p1 5555;
197:
$p2 6666;
198:
oci_bind_by_name($s":p1"$p110);
199:
oci_bind_by_name($s":p2"$p2, -1SQLT_INT);
200:
oci_execute($s);
201:
var_dump($p2);
202:
203:
// Clean up
204:
205:
$stmtarray = array(
206:     
"drop table bind_sqltint_tab"
207:
);
208:
209:
oci8_test_sql_execute($c$stmtarray);
210:
211:
?>
212:
===DONE===
213:

Expected

TEST141 wrong bind type SQLT_INT
array(1) {
  ["VARCHAR2_T10"]=>
  array(1) {
    [0]=>
    string(1) "0"
  }
}

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

TEST143 insert numbers, SQLT_INT
array(1) {
  ["NUMBER_T"]=>
  array(1) {
    [0]=>
    string(2) "42"
  }
}

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

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

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

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

TEST148 insert numbers with SQLT_INT
array(1) {
  ["NUMBER_T92"]=>
  array(1) {
    [0]=>
    string(3) "123"
  }
}

TEST149 insert numbers with SQLT_INT
array(1) {
  ["NUMBER_T92"]=>
  array(1) {
    [0]=>
    string(3) "123"
  }
}

TEST150 insert numbers with SQLT_INT
array(1) {
  ["NUMBER_T92"]=>
  array(1) {
    [0]=>
    string(1) "0"
  }
}

TEST151 - 159 Initialization tests
NULL

TEST152
NULL

TEST153
NULL

TEST154
NULL

TEST155
NULL

TEST156
NULL

TEST157
int(3333)

TEST158
int(4444)

TEST159
int(5555)
===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:56:25
  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- TEST141 wrong bind type SQLT_INT
002- array(1) {
003-   ["VARCHAR2_T10"]=>
004-   array(1) {
005-     [0]=>
006-     string(1) "0"
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:56:25
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- TEST142 insert numbers SQLT_INT
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- TEST143 insert numbers, SQLT_INT
020- array(1) {
021-   ["NUMBER_T"]=>
022-   array(1) {
023-     [0]=>
024-     string(2) "42"
025-   }
026- }
027- 
028- TEST144 insert numbers with SQLT_INT
029- array(1) {
030-   ["NUMBER_T"]=>
031-   array(1) {
032-     [0]=>
033-     string(1) "0"
034-   }
035- }
036- 
037- TEST145 insert numbers with SQLT_INT
038- array(1) {
039-   ["NUMBER_T"]=>
040-   array(1) {
041-     [0]=>
042-     string(3) "-23"
043-   }
044- }
045- 
046- TEST146 insert numbers
047- array(1) {
048-   ["NUMBER_T"]=>
049-   array(1) {
050-     [0]=>
051-     string(3) "-23"
052-   }
053- }
054- 
055- TEST147 insert numbers with SQLT_INT
056- array(1) {
057-   ["NUMBER_T"]=>
058-   array(1) {
059-     [0]=>
060-     string(2) "23"
061-   }
062- }
063- 
064- TEST148 insert numbers with SQLT_INT
065- array(1) {
066-   ["NUMBER_T92"]=>
067-   array(1) {
068-     [0]=>
069-     string(3) "123"
070-   }
071- }
072- 
073- TEST149 insert numbers with SQLT_INT
074- array(1) {
075-   ["NUMBER_T92"]=>
076-   array(1) {
077-     [0]=>
078-     string(3) "123"
079-   }
080- }
081- 
082- TEST150 insert numbers with SQLT_INT
083- array(1) {
084-   ["NUMBER_T92"]=>
085-   array(1) {
086-     [0]=>
087-     string(1) "0"
088-   }
089- }
090- 
091- TEST151 - 159 Initialization tests
092- NULL
093- 
094- TEST152
095- NULL
096- 
097- TEST153
098- NULL
099- 
100- TEST154
101- NULL
102- 
103- TEST155
104- NULL
105- 
106- TEST156
107- NULL
108- 
109- TEST157
110- int(3333)
111- 
112- TEST158
113- int(4444)
114- 
115- TEST159
116- int(5555)
117- ===DONE===

 

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

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