[freetds] tsql bug fixes that got lost between 0.64 and 0.65

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Aug 25 03:24:58 EDT 2006


> 
> | I personally don't like the idea of switching to a 
> different readline(3) 
> | implementation based on whether the terminal is a tty or 
> not.  It will 
> | cause surprising and stupid behavior, like my SQL input 
> mysteriously 
> | failing if it contains a line longer than 1024 characters.
> 
> That is a problem with the current implementation of 
> readline(3) in tsql,
> and can be easily fixed. On systems that have fgetln() use 
> that instead,
> on systems that don't have it use:
> 
>     http://cvsweb.netbsd.org/bsdweb.cgi/src/tools/compat/fgetln.c
> 
> christos

I wrote this
http://freetds.cvs.sourceforge.net/freetds/freetds/src/apps/tsql.c?r1=1.
93&r2=1.94

$ echo -e 'select @@version\ngo\n' | ./tsql -o q -Stesthost -Utest
-Ptest

Microsoft SQL Server  2000 - 8.00.194 (Intel X86)
        Aug  6 2000 00:57:48
        Copyright (c) 1988-2000 Microsoft Corporation
        Personal Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

freddy77




More information about the FreeTDS mailing list