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

entropy at freetds.org entropy at freetds.org
Thu Aug 24 15:14:26 EDT 2006


Christos Zoulas wrote:

> Have you tried strace'ing/truss'ing tsql when it reads an input file?
> Using readline(3), it issues a read(2) per character, not counting the large
> number of failed ioctl(2)'s in the beginning.

Can't say that I have, but I'm not too surprised to hear that it could 
be more efficient.

> We have the code in tsql to
> do the readline, why not just use it when we are not connected to the tty?
> This way, in the future, when readline(3) decides to do something else bogus
> with the input stream we are not going to be affected.

I don't think readline(3) just decided to do this.  readline(3) has been 
doing tab completion for as long as I can remember.  I'm not aware of a 
history of surprising behavior changes in readline(3).  So, as for any 
future unexpected behavior changes, I'm inclined to worry about it when 
it happens instead of worrying about it now.

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.

-- 
Cheers,
entropy



More information about the FreeTDS mailing list