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: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • 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: Fri, 25 Aug 2006 10:36:03 +0200

>
> 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.
>

I applied the patch also cause the 1024 limit where here even for
systems that do not have readline. I think tsql is evolving from it's
"utility to test FreeTDS connections and queries". Reading from ML seems
that 50% and more use tsql for small scripts.

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page