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: David C Worenklein <dcw at gcm dot com>
Subject: [PATCH] Let me know which db handle died
Date: Jan 20 1999 10:24PM

I notice that you don't get your DB handle passed into the
message/error handler if your connection is dead.

I'd like to know who died, so I can reconnect.



*** ../../sybperl-2.10/DBlib/DBlib.xs	Fri Jan  8 13:13:06 1999
--- ./DBlib.xs	Wed Jan 20 16:59:21 1999
***************
*** 755,765 ****
  
  	ENTER;
  	SAVETMPS;
  	PUSHMARK(sp);
  	
! 	if(db && !DBDEAD(db) && (hv = (HV*)dbgetuserdata(db)))
  	{
  	    rv = newRV((SV*)hv);
  		
  	    XPUSHs(sv_2mortal(rv));
  	}
--- 755,765 ----
  
  	ENTER;
  	SAVETMPS;
  	PUSHMARK(sp);
  	
! 	if(db && (hv = (HV*)dbgetuserdata(db)))
  	{
  	    rv = newRV((SV*)hv);
  		
  	    XPUSHs(sv_2mortal(rv));
  	}
***************
*** 821,831 ****
  
  	ENTER;
  	SAVETMPS;
  	PUSHMARK(sp);
  
! 	if(db && !DBDEAD(db) && (hv = (HV*)dbgetuserdata(db)))	/* FIXME */
  	{
  	    rv = newRV((SV*)hv);
  	
  	    XPUSHs(sv_2mortal(rv));
  	}
--- 821,831 ----
  
  	ENTER;
  	SAVETMPS;
  	PUSHMARK(sp);
  
! 	if(db && (hv = (HV*)dbgetuserdata(db)))	/* FIXME */
  	{
  	    rv = newRV((SV*)hv);
  	
  	    XPUSHs(sv_2mortal(rv));
  	}