Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114020 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81566 invoked from network); 11 Apr 2021 09:53:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Apr 2021 09:53:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 10B6C1804B2 for ; Sun, 11 Apr 2021 02:53:57 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from box.beccati.com (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 11 Apr 2021 02:53:56 -0700 (PDT) Received: from authenticated-user (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.beccati.com (Postfix) with ESMTPSA id 79BE4200313; Sun, 11 Apr 2021 11:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1618134834; bh=hlnXbiaduqokvmo0cmXmtVb4Q97ob59H1p3xCIa3hSY=; h=Date:Subject:To:References:From:In-Reply-To:From; b=VfBBtT+Su8irsmMddGHdO0CKrcOFTsL3D0LDnFNh0HxCOrBriI0t1PjmAiGYU8yEd mr0cwMkqbGzhDfOvjowzYtbzqLJCou2uYQlN5ZZV82EjedLVVbuR0sf0e8FqZJfndX OfR2n92SvHgxUOOf+50s1zvhq6olEPW7+FrC/uIfb9bOFJ8Fir5ET8EyKEUjRC+z7g jERqPyZDIX/Zs/m4VeRg3LTC3+6fbFYJXnc5t7+oKoyA9hdXOGX0BbSi3HDOUkGjx2 uB90HG5EpppfjeFiAYfsz276M3Ii2P+Elv6NMBCMV98ojFyLGf33QnM0CZbQbuCuYz PqAE+sQShh3aw== Message-ID: <7b05f88a-ffe4-cb7a-676e-eeadbea36a86@beccati.com> Date: Sun, 11 Apr 2021 11:53:49 +0200 MIME-Version: 1.0 Content-Language: en-GB To: Sergei Morozov , PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Use MySQL syntax only for parsing MySQL statements in PDO From: php@beccati.com (Matteo Beccati) Hi Sergei, in fact I have been working on a secret plan to allow each driver to optionally have their own parser. Due to very limited time I haven't finalised all the details, but the proof of concept looks promising: https://github.com/php/php-src/pull/6852 Perhaps we could work together and come up with an RFC? Cheers On 10/04/2021 19:13, Sergei Morozov wrote: > Hi Internals, > > There are bugs #79276 and #80340 > where PDO parses valid PostgreSQL > statements incorrectly because it uses MySQL grammar for all statements > regardless of the underlying platform. > > I submitted pull request #6410 which > enables extensions to opt-in to MySQL-specific syntax (since it's not > standard). Currently only `pdo_mysql` uses it. > > As Christoph Becker suggested, I'm bringing it here for discussion. > > Technically, it may be a BC break since there may exist PDO-based > extensions outside the PHP repository that rely on compatibility with the > MySQL syntax. > > Are there known extensions like this? Would this change be acceptable in > one of the next minor releases? > > Regards, > Sergei Morozov > -- Matteo Beccati Development & Consulting - http://www.beccati.com/