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: christos AT zoulas.com (Christos Zoulas)
  • 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 13:28:52 -0400

On Aug 24, 12:47pm, entropy AT freetds.org (entropy AT freetds.org) wrote:
-- Subject: Re: [freetds] tsql bug fixes that got lost between 0.64 and 0.65

| Christos Zoulas wrote:
| > 1. You cannot use readline when stdin is not a tty. You need to use the
| > home-brewed version. If you don't believe me, try passing a script
| > to tsql via stdin that has lines that begin with tab. Yes, you guessed
| > it right, readline will helpfully give directory listings.
|
| I'm pretty sure I already fixed that in rev 1.88 of tsql.c. What
| revision do you have?

Well, you did indeed fix it with:

> #ifdef HAVE_READLINE
> rl_inhibit_completion = 1;
> #endif

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

christos




Archive powered by MHonArc 2.6.24.

Top of Page