apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronen Mizrahi <ro...@tversity.com>
Subject Re: possible bug in apr_dbd_sqlite3.c
Date Thu, 15 Sep 2005 20:58:24 GMT
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;
>> }
>>
>
>


Mime
View raw message