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_035.phpt ('oci_lob_copy() - 2')

Script

1: <?php
2:
3:
require __DIR__.'/connect.inc';
4: require 
__DIR__.'/create_table.inc';
5:
6:
$ora_sql "INSERT INTO
7:                        "
.$schema.$table_name." (id, blob)
8:                       VALUES (1, empty_blob())
9:                       RETURNING
10:                                blob
11:                       INTO :v_blob "
;
12:
13:
$statement oci_parse($c,$ora_sql);
14:
$blob oci_new_descriptor($c,OCI_D_LOB);
15:
oci_bind_by_name($statement,":v_blob"$blob,-1,OCI_B_BLOB);
16:
oci_execute($statementOCI_DEFAULT);
17:
18:
var_dump($blob->write("some string here. string, I said"));
19:
oci_commit($c);
20:
21:
$ora_sql "INSERT INTO
22:                        "
.$schema.$table_name." (id, blob)
23:                       VALUES (2, empty_blob())
24:                       RETURNING
25:                                blob
26:                       INTO :v_blob "
;
27:
28:
$statement oci_parse($c,$ora_sql);
29:
$blob oci_new_descriptor($c,OCI_D_LOB);
30:
oci_bind_by_name($statement,":v_blob"$blob,-1,OCI_B_BLOB);
31:
oci_execute($statementOCI_DEFAULT);
32:
33:
oci_commit($c);
34:
35:
$select_sql "SELECT blob FROM ".$schema.$table_name." WHERE id = 1";
36:
$s oci_parse($c$select_sql);
37:
oci_execute($s);
38:
39:
$row1 oci_fetch_array($s);
40:
41:
$select_sql "SELECT blob FROM ".$schema.$table_name." WHERE id = 2 FOR UPDATE";
42:
$s oci_parse($c$select_sql);
43:
oci_execute($sOCI_DEFAULT);
44:
45:
$row2 oci_fetch_array($s);
46:
47:
$dummy oci_new_descriptor($cOCI_D_LOB);
48:
49:
var_dump(oci_lob_copy($dummy$row1[0]));
50:
var_dump(oci_lob_copy($row2[0], $dummy));
51:
52:
var_dump(oci_lob_copy($row2[0], $row1[0], 0));
53:
var_dump(oci_lob_copy($row2[0], $row1[0], -1));
54:
var_dump(oci_lob_copy($row2[0], $row1[0], 100000));
55:
56:
var_dump(oci_lob_size());
57:
var_dump(oci_lob_size($row2[0]));
58: unset(
$dummy->descriptor);
59:
var_dump(oci_lob_size($dummy));
60:
61:
oci_rollback($c);
62:
oci_rollback($c);
63:
oci_commit($c);
64:
oci_commit($c);
65:
66:
$select_sql "SELECT blob FROM ".$schema.$table_name." WHERE id = 2 FOR UPDATE";
67:
$s oci_parse($c$select_sql);
68:
oci_execute($sOCI_DEFAULT);
69:
70:
var_dump($row2 oci_fetch_array($sOCI_RETURN_LOBS));
71:
72: require 
__DIR__.'/drop_table.inc';
73:
74: echo 
"Done\n";
75:
76:
?>
77:

Expected

int(32)

Warning: oci_lob_copy(): OCI_INVALID_HANDLE in %s on line %d
bool(false)

Warning: oci_lob_copy(): OCI_INVALID_HANDLE in %s on line %d
bool(false)
bool(false)

Warning: oci_lob_copy(): Length parameter must be greater than 0 in %s on line %d
bool(false)
bool(true)

Warning: oci_lob_size() expects exactly 1 parameter, 0 given in %s on line %d
NULL
int(0)

Warning: oci_lob_size(): Unable to find descriptor property in %s on line %d
bool(false)
array(2) {
  [0]=>
  string(0) ""
  ["BLOB"]=>
  string(0) ""
}
Done

Output

int(32)

Warning: oci_lob_copy(): OCI_INVALID_HANDLE in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php on line 49
bool(false)

Warning: oci_lob_copy(): OCI_INVALID_HANDLE in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php on line 50
bool(false)
bool(false)

Warning: oci_lob_copy(): Length parameter must be greater than 0 in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php on line 53
bool(false)
bool(true)

Fatal error: Uncaught ArgumentCountError: oci_lob_size() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php:56
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php(56): oci_lob_size()
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php on line 56

Diff

014+ Fatal error: Uncaught ArgumentCountError: oci_lob_size() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php:56
015+ Stack trace:
016+ #0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php(56): oci_lob_size()
017+ #1 {main}
018+   thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_035.php on line 56
014- Warning: oci_lob_size() expects exactly 1 parameter, 0 given in %s on line %d
015- NULL
016- int(0)
017- 
018- Warning: oci_lob_size(): Unable to find descriptor property in %s on line %d
019- bool(false)
020- array(2) {
021-   [0]=>
022-   string(0) ""
023-   ["BLOB"]=>
024-   string(0) ""
025- }
026- Done

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (942 days ago)

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