From dev-return-14760-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Thu Sep 15 20:58:35 2005 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 23333 invoked from network); 15 Sep 2005 20:58:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2005 20:58:35 -0000 Received: (qmail 9240 invoked by uid 500); 15 Sep 2005 20:58:33 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 9116 invoked by uid 500); 15 Sep 2005 20:58:33 -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 9103 invoked by uid 99); 15 Sep 2005 20:58:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Sep 2005 13:58:33 -0700 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=SPF_HELO_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [167.206.4.198] (HELO mta3.srv.hcvlny.cv.net) (167.206.4.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Sep 2005 13:58:41 -0700 Received: from [192.168.1.101] (ool-43516080.dyn.optonline.net [67.81.96.128]) by mta3.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-2.06 (built May 11 2005)) with ESMTP id <0IMV00470M9EU110@mta3.srv.hcvlny.cv.net> for dev@apr.apache.org; Thu, 15 Sep 2005 16:58:29 -0400 (EDT) Date: Thu, 15 Sep 2005 16:58:24 -0400 From: Ronen Mizrahi Subject: Re: possible bug in apr_dbd_sqlite3.c In-reply-to: <4321B658.6010106@tversity.com> To: dev@apr.apache.org Reply-to: ronen@tversity.com Message-id: <4329E070.4050301@tversity.com> Organization: TVersity MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: <431E14E6.6010400@tversity.com> <4321B658.6010106@tversity.com> User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Yet again, I would like to ask if anyone has any feedback on this? If someone out there is pondering some issues about this, please respond, perhaps a discussion may help and at the least I would know that someone is planning to address this issue. Ronen Mizrahi wrote: > Any feedback of this? > > Ronen Mizrahi wrote: > >> Hello, >> >> In sqlite3 "END TRANSACTION" and "COMMIT" are synonyms, yet the code >> below, taken from the svn head of apr_dbd_sqlite3.c, invokes them >> both resulting in sqlite returning an SQL error when doing the commit >> becuase there is no active transaction. Can someone that knows sqlite >> better please check it and confirm this? I would like to know if I am >> correct or I am missing something. As a side comment, in case you are >> wondering, I just realized that this issue was not detected earlier >> due to various bugs in dbd_sqlite3_query() (now they are fixed, thank >> you to whoever fixed them, BTW) that prevented the correct error code >> from being returned. >> >> Thank you, >> >> Ronen >> >> static int dbd_sqlite3_end_transaction(apr_dbd_transaction_t *trans) >> { >> int ret = 0; >> int nrows = 0; >> >> if (trans) { >> ret = dbd_sqlite3_query(trans->handle, &nrows, "END >> TRANSACTION;"); >> if (trans->errnum) { >> trans->errnum = 0; >> ret = dbd_sqlite3_query(trans->handle, &nrows, "ROLLBACK;"); >> } else { >> ret = dbd_sqlite3_query(trans->handle, &nrows, "COMMIT;"); >> } >> trans->handle->trans = NULL; >> } >> >> return ret; >> } >> > >