Skip to content

Silent truncation of varchar data type in freetds 1.4.26 and higher #694

@dishdj-2606

Description

@dishdj-2606

Hi Team,

Could you please assist us with the following query?

We are in the process of migrating our application from FreeTDS version 0.91 on RHEL7 to FreeTDS version 1.4.26 on RHEL8.
During our testing of loading the data using function bcp_exec defined in bcp.c, we encountered a situation where if the data in the input file exceeds the size of the corresponding table column, FreeTDS 1.4.26 truncates the data and loads it into the column without generating any error or warning.
In contrast, with FreeTDS 0.91 on RHEL7, we received the below database error in the same scenario.

SYBASE ERROR #20049 (severity 4 oserrno 0)

Data conversion resulted in overflow
operating system message: SuccessFreeTDS: db-lib: exiting because client error handler returned INT_EXIT for msgno 20049

Could you please advise on how we can configure FreeTDS 1.4.26 to produce an error message similar to the one we received with the previous version?

Please find attached debugging logs.

Could you please look into this on priority.

Logs are attached here.

freetds_rh8.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions