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/lob_030.phpt ('Test piecewise fetch of CLOBs equal to, and larger than PHP_OCI_LOB_BUFFER_SIZE')

Script

1: <?php
2:
3:
require dirname(__FILE__).'/connect.inc';
4: require 
dirname(__FILE__).'/create_table.inc';
5:
6: function 
insert_verify($c$tn$id$length)
7: {
8:     
// Insert the data
9:     
$ora_sql "INSERT INTO
10:                        "
.$tn." (id, clob)
11:                       VALUES ("
.$id.", empty_clob())
12:                       RETURNING
13:                                clob
14:                       INTO :v_clob "
;
15:
16:     
$statement oci_parse($c,$ora_sql);
17:     
$clob oci_new_descriptor($c,OCI_D_LOB);
18:     
oci_bind_by_name($statement,":v_clob"$clob, -1OCI_B_CLOB);
19:     
oci_execute($statementOCI_DEFAULT);
20:
21:     
$data str_pad("x"$length"x");
22:     
$clob->write($data);
23:
24:     
// Verify the data
25:     
$select_sql "SELECT clob FROM ".$tn." where id = ".$id;
26:     
$s oci_parse($c$select_sql);
27:     
oci_execute($s);
28:
29:     
$row oci_fetch_array($sOCI_RETURN_LOBS);
30:
31:     
var_dump(strlen($row[0]));
32: }
33:
34: echo 
"Test 1: A CLOB with an even number of bytes\n";
35:
insert_verify($c$schema.$table_name11050000);
36:
37: echo 
"Test 2: A CLOB with an odd number of bytes\n";
38:
insert_verify($c$schema.$table_name21050001);
39:
40: echo 
"Test 3: A CLOB of 1048576 bytes (== size of PHP_OCI_LOB_BUFFER_SIZE at time of test creation)\n";
41:
insert_verify($c$schema.$table_name31048576);
42:
43: echo 
"Test 4: A CLOB of 1049028 bytes (the value used for chunks in the code)\n";
44:
insert_verify($c$schema.$table_name41049028);
45:
46: echo 
"Test 5: A CLOB of 1049028-1 bytes\n";
47:
insert_verify($c$schema.$table_name51049028-1);
48:
49: echo 
"Test 6: A CLOB of 1049028+1 bytes\n";
50:
insert_verify($c$schema.$table_name61049028+1);
51:
52: require 
dirname(__FILE__).'/drop_table.inc';
53:
54: echo 
"Done\n";
55:
56:
?>
57:

Expected

Test 1: A CLOB with an even number of bytes
int(1050000)
Test 2: A CLOB with an odd number of bytes
int(1050001)
Test 3: A CLOB of 1048576 bytes (== size of PHP_OCI_LOB_BUFFER_SIZE at time of test creation)
int(1048576)
Test 4: A CLOB of 1049028 bytes (the value used for chunks in the code)
int(1049028)
Test 5: A CLOB of 1049028-1 bytes
int(1049027)
Test 6: A CLOB of 1049028+1 bytes
int(1049029)
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:58:02
  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:58:02
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
001- Test 1: A CLOB with an even number of bytes
002- int(1050000)
003- Test 2: A CLOB with an odd number of bytes
004- int(1050001)
005- Test 3: A CLOB of 1048576 bytes (== size of PHP_OCI_LOB_BUFFER_SIZE at time of test creation)
006- int(1048576)
007- Test 4: A CLOB of 1049028 bytes (the value used for chunks in the code)
008- int(1049028)
009- Test 5: A CLOB of 1049028-1 bytes
010- int(1049027)
011- Test 6: A CLOB of 1049028+1 bytes
012- int(1049029)
013- Done
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

 

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

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