[freetds] SP input parameter problem on 0.63
ZIGLIO, Frediano, VF-IT
Frediano.Ziglio at vodafone.com
Wed Aug 17 08:37:14 EDT 2005
> Frank M. Kromann wrote:
> > Hi Freddy,
> > I'm trying to solve http://bugs.php.net/bug.php?id=29316
> too. As far as
> > I can tell this is an issue in FreeTDS too. I'm using
> 0.64-dev from cvs
> > and I'm caling a SP that returns two results. First result
> does not have
> > any rows. On my windows box the code returns both results
> but it looks
> > like FreeTDS is skipping the first result.
> > The code:
> > create procedure a_test as
> > select * from t1 where 1=2
> > select * from t1
> My testing some months ago showed that the FreeTDS ODBC driver didn't
> correctly handle a stored procedure returning:
> 1. a result set
> 2. a message (print/raiserror)
> 3. a result set
Are you sure? I remember I did some tests some time ago (I don't
remember if was during 0.63 or 0.64 code) and fixed it.
However Frank is trying to fix mssql php driver problem which use dblib,
not odbc. 0.63 and 0.64 works quite correctly (FreeTDS seems to returns
3 recordset, not 2).
> IIRC 0.62.3 squelched the message but returned two result
> sets, whereas
> 0.63 at that time attempted -- usually with bad consequences -- to
> concatenate the second result to the first, using the first's
> metadata. I
> wasn't using PHP at all; I traced the problem with unixODBC's isql.
> I'm not sure of the current status in 0.64. ISTR Frediano
> addressed the
> problem and updated the unit tests to cover it. I'm not sure how
> thoroughly it's been tested.
> You don't even need a stored procedure. "select 1 select
> 'a', 'b'" caused
> something bad to happen.
Quite strange. "select 1 select 'a', 'b'" is very simple query. What's
wrong with it?
More information about the FreeTDS