Skip to Content.
Sympa Menu

freetds - Re: set textsize 1048576 fails

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: set textsize 1048576 fails
  • Date: Mon, 29 Oct 2001 22:29:04 -0500 (EST)


One can apply the 'empty_res_hack' to queries that produce no result
tokens at all, and that seems to fix php. You also need a small check in
ct_result_info()

Here's the diff:

Index: ct.c
===================================================================
RCS file: /cvsroot/freetds/freetds/src/ctlib/ct.c,v
retrieving revision 1.4
diff -r1.4 ct.c
416c416,417
< if (tds->res_info && !tds->res_info->rows_exist) {
---
> if (!tds->res_info ||
> (tds->res_info && !tds->res_info->rows_exist)) {
849c850,854
< int_val = resinfo->num_cols;
---
> if (!resinfo) {
> int_val = 0;
> } else {
> int_val = resinfo->num_cols;
> }

I'm going to chew on this for a day or two before I check it in.

Brian
On Mon, 29 Oct 2001, Brian Bruns wrote:

> Ok,
>
> found out what is going on...whether it is correct (from a freetds
> standpoint) is another question.
>
> Whenever a query is issued that returns no results, ct_results() returns
> CS_END_RESULTS on first invocation. CS_END_RESULTS != CS_SUCCEED, so PHP
> gives up and disconnects.
>
> Question is, should the first invocation return CS_END_RESULTS, or should
> it return CS_SUCCEED the first time, follow subsequently by
> CS_END_RESULTS....
>
> Brian
>
> On Tue, 30 Oct 2001, James Cameron wrote:
>
> > Brian Bruns wrote:
> > > Ok, so nothing to do with set textsize exactly then...out of curiousity
> > > (again), you're using sybase-ct, can you configure --with-sybase instead
> > > and see if the problem remains?
> >
> > Trying. Failing ... I've gotta first understand the Debian build
> > scripts; I thought it would be a simple task to change the configure in
> > PHP's debian/rules file in the package source directory, but that has
> > led to a php4-sybase package with no actual shared library in it. Not
> > surprisingly the result is sybase_connect() undefined.
> >
> >
>
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>





Archive powered by MHonArc 2.6.24.

Top of Page