apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r366588 - /apr/apr-util/trunk/dbd/apr_dbd_oracle.c
Date Fri, 06 Jan 2006 22:46:14 GMT
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 */



Mime
View raw message