freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: PHP: Conversions working, but error handling broken
- From: Brian Bruns <camber AT ais.org>
- To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
- Subject: Re: PHP: Conversions working, but error handling broken
- Date: Tue, 27 Aug 2002 07:18:30 -0400 (EDT)
The reset msg thing was in there to fix a mem leak. I've changed the
behaviour to instead rely on the return code from tds_process_msg(). It
should work now, feedback appreciated. Did someone break login.c though?
I can't get a clean compile from CVS.
Brian
On Mon, 26 Aug 2002 lbayuk AT mindspring.com wrote:
> But I'm having a problem with error handling: PHP's sybase_query() is not
> properly returning FALSE on a failed query. The error message gets reported
> (unless suppressed as @sybase_query()), but the TRUE return leaves the
> calling script thinking the query worked, when in fact it failed.
>
> The same test works on PHP built with sybase_ct and Sybase OpenClient
> library: sybase_query returns FALSE on an error. Worse news: The same test
> works with FreeTDS-0.53, and with earlier CVS versions. So please consider
> this a regression issue, when considering the future 0.60 release.
>
> I think I can see the problem: The error condition is set in
> tds_process_msg(), but cleared by the error handler which ctlib installs.
> Back in tds_process_result_tokens(), it sees the cleared priv_msg_type flag
> and decides there really wasn't an error after all.
>
> Browsing CVS, I see a change to ctlib/ctutil.c CVS version 1.5 on
> 2002-07-16 by brianb to add a call to tds_reset_msg_info() from
> the ctlib error handler ctlib_handle_err_message(). This might have
> been where the problem started. Needless to say, my attempts at a quick
> fix - change it back - failed horribly. Help...
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>
-
PHP: Conversions working, but error handling broken,
lbayuk, 08/26/2002
- <Possible follow-up(s)>
- Re: PHP: Conversions working, but error handling broken, Brian Bruns, 08/27/2002
Archive powered by MHonArc 2.6.24.