tdsodbc truncates varchar fields to 255 characters

Bug #613238 reported by Mikhail Veygman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
freetds (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: tdsodbc

ODBC connection using libtdsodbc connecting to MS SQL server will truncate varchar fields to 255 characters. Confirmed using RODBC and isql.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: tdsodbc 0.82-6build1
ProcVersionSignature: Ubuntu 2.6.32-23.37-server 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-server x86_64
Architecture: amd64
Date: Tue Aug 3 18:52:58 2010
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: freetds

Revision history for this message
Mikhail Veygman (mveygman) wrote :
Revision history for this message
Mikhail Veygman (mveygman) wrote :

I think I may have found a problem and it is in the way that the library is built.

By default if TDS version is not specified it will set the TDS version to 5.0. There is a way to reset the version of connection after the login, but there doesn't appear to be any calls to the function that does it.

With this the TDS connection version is set to the default from the build which is 5.0 and hence will set the max_len of the varchar, varbinary, etc fields to 255 vs 8000 for the version of TDS 7+.

Revision history for this message
Steve Langasek (vorlon) wrote :

> By default if TDS version is not specified it will set the TDS version to 5.0.

No, by default we set it to 4.2, not to 5.0

> There is a way to reset the version of connection after the login, but there doesn't
> appear to be any calls to the function that does it.

Does specifying the desired protocol version with the 'tds version' option in /etc/freetds/freetds.conf not solve this?

Revision history for this message
Steve Langasek (vorlon) wrote :

As asked in 2011:

> Does specifying the desired protocol version with the 'tds version' option in /etc/freetds/freetds.conf not solve this?

Changed in freetds (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for freetds (Ubuntu) because there has been no activity for 60 days.]

Changed in freetds (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.