Skip to Content.
Sympa Menu

freetds - tds_msg_info->msg_number should be TDS_UINT?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Dave Brotherstone" <davegb AT pobox.com>
  • To: <freetds AT franklin.oit.unc.edu>
  • Subject: tds_msg_info->msg_number should be TDS_UINT?
  • Date: Sat, 26 Jan 2002 00:30:32 -0000


Hi,
Is there any reason why tds_msg_info->msg_number isn't a TDS_UINT?
There's a few points that it needs changing in, but it does mean that
function set by dberrhandle() is called correctly for user errors - ie.
errors over 50000 - which obviously don't fit into a signed TDS_SMALLINT.
The problem is actually caused by line 48 of dbutil.c

if( tds->msg_info->msg_number > 0 )
{
... etc

Of course, it's not >0 if its a signed small int, and the error is a user
error > 32767 ;-)

I've changed it at the various points, and tried it under PHP4/Apache and it
works spot on (the php_sybase_err_handler routine wasn't being called for
user errors, ie. anything over 32767 before).

Shall I submit a patch, or just run and hide <g>


Thanks,
Dave.







Archive powered by MHonArc 2.6.24.

Top of Page