PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: syb_more_results and stored proc errors in DBD::Sybase 0.08
Date: May 28 1998 11:27PM

Michael Peppler writes:
 > Ken Fasman writes:
 >  > In the script included below, the erroneous parameter passed to sp_who 
 >  > results in an infinite loop processing the *second* result set.  Am I using 
 >  > syb_more_results incorrectly, or is a bug in DBD::Sybase 0.08 failing to 
 >  > reset this flag when an error occurs?
 > 
 > This is a bug.
 > 
 > I'll try to find a moment to fix it...

OK - here's a patch:

*** /tmp/T0a001oD	Thu May 28 16:26:24 1998
--- dbdimp.c	Thu May 28 16:24:54 1998
***************
*** 1294,1300 ****
  	      fprintf(DBILOGFP, "    syb_st_fetch() -> st_next_results() == %d\n",
  		      restype);
  
! 	  if(restype == CS_CMD_DONE) {
  	      imp_sth->moreResults = 0;
  	      imp_sth->dyn_execed = 0;
  	      DBIc_ACTIVE_off(imp_sth);
--- 1294,1300 ----
  	      fprintf(DBILOGFP, "    syb_st_fetch() -> st_next_results() == %d\n",
  		      restype);
  
! 	  if(restype == CS_CMD_DONE || restype == CS_CMD_FAIL) {
  	      imp_sth->moreResults = 0;
  	      imp_sth->dyn_execed = 0;
  	      DBIc_ACTIVE_off(imp_sth);
***************
*** 1682,1688 ****
  
      if (phs->sv == &sv_undef) { /* first bind for this placeholder      */
          phs->ftype    = CS_CHAR_TYPE;
! //	phs->sql_type = (sql_type) ? sql_type : CS_CHAR_TYPE;
          phs->maxlen   = maxlen;         /* 0 if not inout               */
          phs->is_inout = is_inout;
          if (is_inout) {
--- 1682,1688 ----
  
      if (phs->sv == &sv_undef) { /* first bind for this placeholder      */
          phs->ftype    = CS_CHAR_TYPE;
! /*	phs->sql_type = (sql_type) ? sql_type : CS_CHAR_TYPE;           */
          phs->maxlen   = maxlen;         /* 0 if not inout               */
          phs->is_inout = is_inout;
          if (is_inout) {


Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com