Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9670 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98304 invoked by uid 1010); 5 May 2004 16:25:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 98242 invoked from network); 5 May 2004 16:25:06 -0000 Received: from unknown (HELO mx.crye-leike.com) (208.62.148.9) by pb1.pair.com with SMTP; 5 May 2004 16:25:06 -0000 Received: from mail.crye-leike.com (local.mail [10.62.148.196]) by mx.crye-leike.com (8.12.11/8.12.11) with ESMTP id i45GOwsF008485 for ; Wed, 5 May 2004 11:24:58 -0500 Received: from qh12008 (usr1.crye-leike.com [208.62.148.2]) by mail.crye-leike.com (8.12.11/8.12.11) with SMTP id i45GOwqA008398 for ; Wed, 5 May 2004 11:24:58 -0500 To: Date: Wed, 5 May 2004 11:24:42 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 X-SA-Status: 2 X-Scanned-By: MIMEDefang 2.42 Subject: Question about recent change to sybase module From: michaels@crye-leike.com ("Michael Sims") (Please forgive me if this is not the right forum for this question. This isn't exactly a bug so I didn't feel it was right to open a bug report.) I have a question about a change that was made to ext/sybase/php_sybase_db.c between PHP versions 4.3.3 and 4.3.4. I'm referring specifically to revision 1.38.2.14. Here's the diff: http://makeashorterlink.com/?L14025838 I've been using PHP + FreeTDS + the sybase extension for the past 2 years to access a MS-SQL version 7 server without issue. After the above change I'm running into an odd problem with bit fields. I frequently do boolean checks on bit fields in my code, like so: $row = $db->fetch_object($result); if ($row->bitField) { ... } else { ... } It seems that all this time FreeTDS is returning a bit field that contains '0' in the database with about 20 additional spaces padded on the right side. All this time I was not aware of it because the code in the sybase extension was trimming it for me, but with the change mentioned above it is no longer doing so, and my boolean checks are all returning true, since they are checking "0 " instead of just "0". I suppose this may be a bug with FreeTDS, or something else, but I was just curious as to why this whitespace stripping was there in the first place, and why it was removed (the commit log just says "MFH: Do not strip trailing spaces"). I was hoping someone here could point me in the right direction before I started ripping everything apart to see where this whitespace is being introduced. Thanks in advance...