Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115358 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 6547 invoked from network); 7 Jul 2021 20:53:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Jul 2021 20:53:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 05A841804C9 for ; Wed, 7 Jul 2021 14:15:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from malamute.woofle.net (woofle.net [74.207.252.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 7 Jul 2021 14:15:34 -0700 (PDT) Received: by malamute.woofle.net (Postfix) with ESMTPSA id BF4C11F0DB; Wed, 7 Jul 2021 14:15:32 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) In-Reply-To: Date: Wed, 7 Jul 2021 14:15:29 -0700 Cc: Daniel Beardsley Content-Transfer-Encoding: quoted-printable Message-ID: References: To: PHP internals X-Mailer: Apple Mail (2.3654.100.0.2.22) Subject: Re: [PHP-DEV] [VOTE] Add PDO function: mysqlGetWarningCount From: dusk@woofle.net (Dusk) On Jul 6, 2021, at 08:34, Daniel Beardsley wrote: > The proposal: >> Add a function that exposes the warning count of the most recent >> statement for MySQL: $pdo->mysqlGetWarningCount(). It returns an int >> straight from the MySQL driver. This fixes the open bug at: >> https://bugs.php.net/bug.php?id=3D51499. >=20 > Voting will be open till 2020-07-21 >=20 > https://wiki.php.net/rfc/pdo-mysql-get-warning-count The proposed vote declares that that: > =E2=80=9CYes=E2=80=9D means this pull request should be merged = (pending code review). =E2=80=9CNo=E2=80=9D means we don't want PDO to = expose MySQLs warning count. This seems like a false dichotomy. What response would be appropriate = for "exposing the MySQL warning count in PDO is fine, but this isn't the = right way to do it"? I'm not eligible to vote, but speaking for myself, I'd prefer a more = generic mechanism for exposing metadata about queries -- not one that's = specific to MySQL, nor one which only exposes a warning count. For = example, MySQL also exposes some flags for statements where no index was = used, and SQLite has functions to obtain the expanded SQL for a = statement or to check if it's a read-only operation; all of these, along = with the MySQL warning count, would fit nicely into a more generic PDO = statement metadata API. Would it be possible to amend the voting statement to: > =E2=80=9CYes=E2=80=9D means this pull request should be merged = (pending code review). =E2=80=9CNo=E2=80=9D means **the pull request = should not be merged**. without invalidating existing votes? It would be unfortunate for this = vote to be interpreted as a rejection of any future PDO API which = happens to include the MySQL warning count.=