Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105741 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81243 invoked from network); 18 May 2019 12:44:57 -0000 Received: from unknown (HELO mout.gmx.net) (212.227.17.20) by pb1.pair.com with SMTP; 18 May 2019 12:44:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1558173090; bh=k1qJKGi6pMyvoNHzXNtJP+zesFG8SdX3W8Xcpu+JWn4=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=fqLY61rBvJbW8uS6smcB9ht1kb5LqS2LEYbIrlvi7PEVUvOAuaATG5SSeHme4VNTl JN/WAKSTj4bY5x9HfdW0bVUoB/RAco+Bk1bawGm3PcWzQDd/h18VeUetydxAvargtM A6jlFnpyH5J2NLMXMTOGVnXo3zobKkBScmiYxmgw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.144] ([84.179.225.210]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MYcJi-1hE8VE1dr8-00VOlB; Sat, 18 May 2019 11:51:30 +0200 To: Robert Kopack , internals@lists.php.net References: Message-ID: <42b836d2-5193-b2fd-bf0a-6ccf8843bc03@gmx.de> Date: Sat, 18 May 2019 11:51:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:MP7skN6ERzSsJth1Lv1aw5RzJ059odKWDPKZ+P82CzO50dL53Zn rjtgtus46nL0SqMPPmU88ytaE2YSMWCapNUb/5MRbocBYgvQh+JStVYKrjqW3VjqSzAiuHy bIp6aFgG5CQaYlHAuZKct5mV0rhxLQuFS3CIkWoFJoLSpDgjC0qDc3/awUz4uhif7q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paAnF0bGTN+uT0FhC4aCFhxiKAL Subject: Re: RFC for Sqlite3 Extended Error Codes From: cmbecker69@gmx.de ("Christoph M. Becker") On 16.05.2019 at 15:51, Robert Kopack wrote: > On Wed, May 15, 2019 at 7:00 PM Christoph M. Becker > wrote: > >> I haven't reviewed closely for now, but basically I like these >> additions. With regard to sqlite3_extended_result_codes() we have to >> review existing error checks (they likely need small adjustments, if >> extended error codes are enabled). And we likely want to have a few >> tests for the new functionality. > > I didn't consider that! And just to clarify are you referring to the > results from sqlite3_extended_errcode() or the return value from > sqlite3_extended_result_codes()? I was referring to the slight behavioral change that is caused by calling sqlite3_extended_result_codes(db, 1). As I understand it, this will cause other functions to possibly return extended error codes instead of primary result codes. It seems, though, that there would not be any conflict right now, since only SQLITE_OK, SQLITE_ROW and SQLITE_DONE are checked in ext/sqlite3, and these do not have extended error codes. Still it might make sense to mask these checks to prevent future issues. And of course, we would have to be careful, if we add checks for e.g. SQLITE_BUSY in the future. > If it's the latter, and after glancing at the sqlite source, it looks li= ke > that function returns either SQLITE_MISUSE (21) or SQLITE_OK (0). I put = in > -1 instead of 21 as the return for that function in error because I felt > that was following what PHP normally does on error (perhaps FALSE would = be > better?) In fact, on further thought, returning the 0 from success on th= at > might be confusing as well. Perhaps it would better suited to check the > return and return TRUE on SQLITE_OK and FALSE on SQLITE_MISUSE? I think the method should return TRUE on success, and FALSE on failure. An alternative might be to return the old value, like done by SQLite3::enableExceptions(). > Thank you for your time! Thanks for your's. :) =2D- Christoph M. Becker