Skip to content

Inserting to a column CLOB, fill all clob with x00  #187

@abamara

Description

@abamara

Hi

Inserting to a CLOB column, fill all clob with x00 at the end.

When inserting a row, using bindParameters with and targeting a table with a CLOB it add 00 to fill all clob size.
If my CLOB is defined with a size 1MB, select LENGTH(MYCLOB) from MYTABLE return 1MB and not the size of my actual data.

If I use a 2D array bindParameters( [ ['mytext', db.IN, db.SQL_ALL_TYPE] ] ) it fill the full CLOB with x00.
So the select LENGTH(MYCLOB) form MYTABLE returns 1MB

If I use a 1D array bindParameters( ['mytext'] ) it doesn't fill the CLOB column with x00
So the select LENGTH(MYCLOB) form MYTABLE returns only the actual data I inserted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions