[erlang-questions] ODBC and longtext limitation

Leif Einar Aune leif.einar@REDACTED
Mon May 8 11:31:52 CEST 2017


Hi list,

We are using OTP18.3 on Centos towards a MySQL database using ODBC. When switching a column to LONGTEXT, ODBC type SQL_LONGVARCHAR, we noticed that the values were chopped off when reading from Erlang.

Reading odbcserver.h and odbcserver.c in the erlang distribution this was no surprise, as the 'size' variable is set to MAXCOLSIZE (=8001).

Increasing this define and recompiling the odbcserver fixed the limitation. Has anyone else experienced this limitation, and perhaps come up with a better solution? The solution feels wrong, since the maximum value of a LONGTEXT is rather big, and you do not want to malloc 4GB of memory for each LONGTEXT column.

Best Regards
Leif Einar Aune


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170508/3a56e364/attachment.htm>


More information about the erlang-questions mailing list