Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 87400 invoked from network); 14 Aug 2005 18:23:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Aug 2005 18:23:18 -0000 Received: (qmail 44019 invoked by uid 500); 14 Aug 2005 18:23:16 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 43972 invoked by uid 500); 14 Aug 2005 18:23:16 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 43959 invoked by uid 99); 14 Aug 2005 18:23:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Aug 2005 11:23:15 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.201.215] (HELO web30012.mail.mud.yahoo.com) (68.142.201.215) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 14 Aug 2005 11:23:35 -0700 Received: (qmail 83943 invoked by uid 60001); 14 Aug 2005 18:23:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=x4xwlcjo/wOyrcivbbHxXO7Yvi+HGzYima30a4kgi4gkRaf+IP4d3NfDVxxcnc8QrQII0ei3S+2MgQH8sGrUMZ5vo9/Iq6fZRZ8t/LRaKLZBcv8J3M9tFHx4/1D/4F0R8Qw5Lj1STgE8H5buykrPn+Bp+v1NePrqVKrHQ1Mld7E= ; Message-ID: <20050814182312.83941.qmail@web30012.mail.mud.yahoo.com> Received: from [216.139.17.9] by web30012.mail.mud.yahoo.com via HTTP; Sun, 14 Aug 2005 11:23:12 PDT Date: Sun, 14 Aug 2005 11:23:12 -0700 (PDT) From: Rick Keiner Subject: Re: APR-Util 1.2.1 To: Paul Querna , APR Developer List In-Reply-To: <42FE9A71.6020307@force-elite.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1029286134-1124043792=:81936" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1029286134-1124043792=:81936 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Id: Content-Disposition: inline Hi Paul, I've attached a patch to the SQLite 3 driver that fixes some initialization issues and returns float data. This has been tested with the jxta-c.jxta.org project and no major issues. If we could get it in the release that would be great! We are relying on this patch to be part of the release. Rick Keiner --- Paul Querna wrote: > APR-Util 1.2.1 is now available from: > http://people.apache.org/~pquerna/dev/apu-1.2.1/ > > Please test and vote on releasing it. > > Thanks, > > Paul > --0-1029286134-1124043792=:81936 Content-Type: text/x-patch; name="NumericSupport.patch" Content-Description: 2916204651-NumericSupport.patch Content-Disposition: inline; filename="NumericSupport.patch" Index: dbd/apr_dbd_sqlite3.c =================================================================== --- dbd/apr_dbd_sqlite3.c (revision 232397) +++ dbd/apr_dbd_sqlite3.c (working copy) @@ -117,6 +117,7 @@ } else { apr_thread_mutex_unlock(sql->mutex); apr_sleep(MAX_RETRY_SLEEP); + apr_thread_mutex_lock(sql->mutex); } } else if (ret == SQLITE_ROW) { int length; @@ -135,22 +136,20 @@ column->size = sqlite3_column_bytes((*results)->stmt, i); column->type = sqlite3_column_type((*results)->stmt, i); switch (column->type) { - - case SQLITE_FLOAT: - break; - case SQLITE_INTEGER: - case SQLITE_TEXT: - hold = NULL; - hold = (char *) sqlite3_column_text((*results)->stmt, i); - if (hold) { - column->value = apr_palloc(pool, column->size + 1); - strncpy(column->value, hold, column->size + 1); - } - break; - case SQLITE_BLOB: - break; - case SQLITE_NULL: - break; + case SQLITE_FLOAT: + case SQLITE_INTEGER: + case SQLITE_TEXT: + hold = NULL; + hold = (char *) sqlite3_column_text((*results)->stmt, i); + if (hold) { + column->value = apr_palloc(pool, column->size + 1); + strncpy(column->value, hold, column->size + 1); + } + break; + case SQLITE_BLOB: + break; + case SQLITE_NULL: + break; } col = row->columns[i]; } @@ -226,19 +225,13 @@ { sqlite3_stmt *stmt = NULL; const char *tail = NULL; - int ret, length = 0; + int ret = 0, retry_count = 0, length = 0; apr_status_t res; - apr_pool_t *pool; if (sql->trans && sql->trans->errnum) { return sql->trans->errnum; } - res = apr_pool_create(&pool, sql->pool); - if (res != APR_SUCCESS) { - sql->trans->errnum = res; - return SQLITE_ERROR; - } length = strlen(query); apr_thread_mutex_lock(sql->mutex); @@ -248,7 +241,6 @@ sqlite3_finalize(stmt); break; } - ret = sqlite3_step(stmt); *nrows = sqlite3_changes(sql->conn); sqlite3_finalize(stmt); @@ -260,7 +252,6 @@ res = 0; } apr_thread_mutex_unlock(sql->mutex); - apr_pool_destroy(pool); if (sql->trans) { sql->trans->errnum = res; } --0-1029286134-1124043792=:81936--