Skip to Content.
Sympa Menu

freetds - Re: [freetds] [PATCH] Fix segfault when triggering a foreign keyviolation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] [PATCH] Fix segfault when triggering a foreign keyviolation
  • Date: Mon, 12 Jan 2004 11:30:12 -0500

On Mon, 12 Jan 2004, "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
wrote:
> > When such an aforementioned error is triggered the database
> > sends a EED token which gets processed by tds_process_msg().
> > When the status byte of the EED message is set to 1,
> > additional error data follows; freetds fails to read this
> > data from wire - which appears to let sqsh think it must read
> > data and thus causing it to segfault.
> >
> > The attached patch fixes this bug
>
> this patch was included in 0.62 however I do not agree... the reason is
> that tds_process_trailing_tokens all tokens till IDLE state so client do
> not receive DONE token...

Ach. I don't know why, Freddy; I thought you had seen it. Alex is fixing
a real problem, which he tested. I suppose if our unit tests were more
rigorous, they would have exposed the state problem you refer to.

What to do? It seems we need to read the extended error data AND leave
the stream in IDLE state. If we come up with a way to do that fairly
soon, we can apply it to the 0.62 branch as well as the trunk. At some
future point -- depending on how critical this is (not clear, to me) -- we
can release 0.62.1, with or without other fixes.

--jkl








Archive powered by MHonArc 2.6.24.

Top of Page