Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 28868 invoked from network); 6 Jan 2006 22:46:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Jan 2006 22:46:36 -0000 Received: (qmail 5342 invoked by uid 500); 6 Jan 2006 22:46:36 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 5309 invoked by uid 500); 6 Jan 2006 22:46:35 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 5298 invoked by uid 99); 6 Jan 2006 22:46:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2006 14:46:35 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 06 Jan 2006 14:46:34 -0800 Received: (qmail 28665 invoked by uid 65534); 6 Jan 2006 22:46:14 -0000 Message-ID: <20060106224614.28663.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r366588 - /apr/apr-util/trunk/dbd/apr_dbd_oracle.c Date: Fri, 06 Jan 2006 22:46:14 -0000 To: commits@apr.apache.org From: niq@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: niq Date: Fri Jan 6 14:46:11 2006 New Revision: 366588 URL: http://svn.apache.org/viewcvs?rev=366588&view=rev Log: Fix parameters parsing (reported as a bug in the MySQL driver it was cloned from) Modified: apr/apr-util/trunk/dbd/apr_dbd_oracle.c Modified: apr/apr-util/trunk/dbd/apr_dbd_oracle.c URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/dbd/apr_dbd_oracle.c?rev=366588&r1=366587&r2=366588&view=diff ============================================================================== --- apr/apr-util/trunk/dbd/apr_dbd_oracle.c (original) +++ apr/apr-util/trunk/dbd/apr_dbd_oracle.c Fri Jan 6 14:46:11 2006 @@ -80,10 +80,10 @@ #include "apr_hash.h" #define TRANS_TIMEOUT 30 -#define MAX_ARG_LEN 256 /* in line with other apr_dbd drivers. We alloc this +#define MAX_ARG_LEN 256 /* in line with other apr_dbd drivers. We alloc this * lots of times, so a large value gets hungry. - * Should really make it configurable - */ + * Should really make it configurable + */ #define DEFAULT_LONG_SIZE 4096 #define DBD_ORACLE_MAX_COLUMNS 256 #define NUMERIC_FIELD_SIZE 32 @@ -319,6 +319,12 @@ for (key = ptr-1; isspace(*key); --key); klen = 0; while (isalpha(*key)) { + if (key == params) { + /* Don't parse off the front of the params */ + --key; + ++klen; + break; + } --key; ++klen; } @@ -909,7 +915,7 @@ * holding it in memory */ case APR_DBD_ORACLE_LOB: - break; /* bind LOBs at write-time */ + break; /* bind LOBs at write-time */ /* This is also cited in the docs for LOB, if we don't * want the whole thing in memory */ @@ -1034,7 +1040,7 @@ stmt->out[i].sz = 171; break; case SQLT_CHR: /* 1: char */ - case SQLT_AFC: /* 96: ANSI fixed char */ + case SQLT_AFC: /* 96: ANSI fixed char */ stmt->out[i].sz *= 4; /* ugh, wasteful UCS-4 handling */ break; case SQLT_DAT: /* 12: date, depends on NLS date format */