Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: entropy AT freetds.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tsql bug fixes that got lost between 0.64 and 0.65
  • Date: Thu, 24 Aug 2006 15:14:26 -0400

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




Archive powered by MHonArc 2.6.24.

Top of Page