freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- 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.
-
tds_msg_info->msg_number should be TDS_UINT?,
Dave Brotherstone, 01/25/2002
- <Possible follow-up(s)>
- Re: tds_msg_info->msg_number should be TDS_UINT?, Brian Bruns, 01/25/2002
Archive powered by MHonArc 2.6.24.