FreeTDS runs out of memory from DBD::Sybase

Posted by skiphoppy on Stack Overflow See other posts from Stack Overflow or by skiphoppy
Published on 2010-05-07T17:10:20Z Indexed on 2010/05/07 17:28 UTC
Read the original article Hit count: 261

Filed under:
|
|

When I add

client charset = UTF-8

to my freetds.conf file, my DBD::Sybase program emits:

Out of memory!

and terminates. This happens when I call execute() on an SQL query statement that returns any ntext fields. I can return numeric data, datetimes, and nvarchars just fine, but whenever one of the output fields is ntext, I get this error.

All these queries work perfectly fine without the UTF-8 setting, but I do need to handle some characters that throw warnings under the default character set. (See related question.)

The error message is not formatted the same way other DBD::Sybase error messages seem to be formatted. I do get a message that a rollback() is being issued, though. (My false AutoCommit flag is being honored.) I think I read somewhere that FreeTDS uses the iconv program to convert between character sets; is it possible that this message is being emitted from iconv?

If I execute the same query with the same freetds.conf settings in tsql (FreeTDS's command-line SQL shell), I don't get the error.

I'm connecting to SQL Server.

What do I need to do to get these queries to return successfully?

© Stack Overflow or respective owner

Related posts about perl

Related posts about dbi