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_020.phpt ('oci_lob_write()/erase()/read() with CLOBs')

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." (Clob)
8:                       VALUES (empty_Clob())
9:                       RETURNING
10:                                clob
11:                       INTO :v_clob "
;
12:
13:
$statement oci_parse($c,$ora_sql);
14:
$clob oci_new_descriptor($c,OCI_D_LOB);
15:
oci_bind_by_name($statement,":v_clob"$clob,-1,OCI_B_CLOB);
16:
oci_execute($statementOCI_DEFAULT);
17:
18:
var_dump($clob);
19:
20:
$str "this is a biiiig faaat test string. why are you reading it, I wonder? =)";
21:
var_dump($clob->write($str));
22:
var_dump($clob->erase(10,20));
23:
24:
oci_commit($c);
25:
26:
$select_sql "SELECT clob FROM ".$schema.$table_name." FOR UPDATE";
27:
$s oci_parse($c$select_sql);
28:
oci_execute($sOCI_DEFAULT);
29:
30:
var_dump($row oci_fetch_array($s));
31:
32:
var_dump($row[0]->read(2));
33:
var_dump($row[0]->read(5));
34:
var_dump($row[0]->read(50));
35:
36:
var_dump($clob->erase());
37:
var_dump($clob->erase(-10));
38:
var_dump($clob->erase(10,-20));
39:
var_dump($clob->erase(-10,-20));
40:
var_dump($clob->erase(-10,-201));
41:
42:
var_dump(oci_lob_erase($clob));
43:
var_dump(oci_lob_erase($clob,-10));
44:
var_dump(oci_lob_erase($clob,10,-20));
45:
var_dump(oci_lob_erase($clob,-10,-20));
46:
var_dump(oci_lob_erase($clob,-10,-201));
47:
48: unset(
$clob->descriptor);
49:
var_dump(oci_lob_erase($clob,10,20));
50:
51: require 
__DIR__.'/drop_table.inc';
52:
53: echo 
"Done\n";
54:
55:
?>
56:

Expected

object(OCI-Lob)#%d (1) {
  ["descriptor"]=>
  resource(%d) of type (oci8 descriptor)
}
int(77)
int(20)
array(2) {
  [0]=>
  object(OCI-Lob)#%d (1) {
    ["descriptor"]=>
    resource(%d) of type (oci8 descriptor)
  }
  ["CLOB"]=>
  object(OCI-Lob)#%d (1) {
    ["descriptor"]=>
    resource(%d) of type (oci8 descriptor)
  }
}
string(2) ""
string(5) "th"
string(50) "is                     st string. why are you read"

Warning: OCI-Lob::erase(): ORA-22990: LOB locators cannot span transactions in %s on line %d
bool(false)

Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: OCI-Lob::erase(): Length must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: OCI-Lob::erase() expects at most 2 parameters, 3 given in %s on line %d
NULL

Warning: oci_lob_erase(): ORA-22990: LOB locators cannot span transactions in %s on line %d
bool(false)

Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: oci_lob_erase(): Length must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: oci_lob_erase() expects at most 3 parameters, 4 given in %s on line %d
NULL

Warning: oci_lob_erase(): Unable to find descriptor property in %s on line %d
bool(false)
Done

Output

object(OCI-Lob)#1 (1) {
  ["descriptor"]=>
  resource(11) of type (oci8 descriptor)
}
int(77)
int(20)
array(2) {
  [0]=>
  object(OCI-Lob)#2 (1) {
    ["descriptor"]=>
    resource(13) of type (oci8 descriptor)
  }
  ["CLOB"]=>
  object(OCI-Lob)#2 (1) {
    ["descriptor"]=>
    resource(13) of type (oci8 descriptor)
  }
}
string(2) ""
string(5) "th"
string(50) "is                     st string. why are you read"

Warning: OCI-Lob::erase(): ORA-22990: LOB locators cannot span transactions in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php on line 36
bool(false)

Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php on line 37
bool(false)

Warning: OCI-Lob::erase(): Length must be greater than or equal to 0 in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php on line 38
bool(false)

Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php on line 39
bool(false)

Fatal error: Uncaught ArgumentCountError: OCI-Lob::erase() expects at most 2 parameters, 3 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php:40
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php(40): OCI-Lob->erase(-10, -20, 1)
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php on line 40

Diff

035+ Fatal error: Uncaught ArgumentCountError: OCI-Lob::erase() expects at most 2 parameters, 3 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php:40
036+ Stack trace:
037+ #0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php(40): OCI-Lob->erase(-10, -20, 1)
038+ #1 {main}
039+   thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_020.php on line 40
035- Warning: OCI-Lob::erase() expects at most 2 parameters, 3 given in %s on line %d
036- NULL
037- 
038- Warning: oci_lob_erase(): ORA-22990: LOB locators cannot span transactions in %s on line %d
039- bool(false)
040- 
041- Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
042- bool(false)
043- 
044- Warning: oci_lob_erase(): Length must be greater than or equal to 0 in %s on line %d
045- bool(false)
046- 
047- Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
048- bool(false)
049- 
050- Warning: oci_lob_erase() expects at most 3 parameters, 4 given in %s on line %d
051- NULL
052- 
053- Warning: oci_lob_erase(): Unable to find descriptor property in %s on line %d
054- bool(false)
055- Done

 

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

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