ID:               37406
 User updated by:  spatar at mail dot nnov dot ru
 Reported By:      spatar at mail dot nnov dot ru
 Status:           Open
 Bug Type:         OCI8 related
 Operating System: SuSE
 PHP Version:      5.1.4
 New Comment:

In older snapshot php5.1-200604030830 it worked:
----------------
size(): 26
load(): abcdefghijklmnopqrstuvwxyz


Previous Comments:
------------------------------------------------------------------------

[2006-05-11 10:57:29] spatar at mail dot nnov dot ru

Description:
------------
Can't load lob string.
It seems, OCI8 calculates wrong size in _bytes_ for UTF strings to
load.
My Oracle database charset is AL32UTF8, so maybe it's the cause of that
the load() method returns only the first 1/4 part of a string.
The older versions didn't have this bug.

Reproduce code:
---------------
<?php
        $conn = oci_connect("scott", "tiger", "ora10201");
        $sql =  "begin :p_clob := 'abcdefghijklmnopqrstuvwxyz'; end;";
        $stid = oci_parse($conn, $sql);
        $clob = oci_new_descriptor($conn, OCI_D_LOB);
        oci_bind_by_name($stid, ":p_clob", $clob, -1, OCI_B_CLOB);
        $r = oci_execute($stid, OCI_DEFAULT);
        if ($r)
        {
                echo "size(): ", $clob->size(), "\n";
                echo "load(): ", $clob->load(), "\n";
        }
        $clob->free();
        oci_free_statement($stid);
        oci_close($conn);
?>

Expected result:
----------------
size(): 26
load(): abcdefghijklmnopqrstuvwxyz

Actual result:
--------------
size(): 26
load(): abcdef


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37406&edit=1

Reply via email to