Use MySQL syntax only for parsing MySQL statements in PDO

From: Date: Sat, 10 Apr 2021 17:13:12 +0000
Subject: Use MySQL syntax only for parsing MySQL statements in PDO
Groups: php.internals 
Request: Send a blank email to internals+get-114016@lists.php.net to get a copy of this message
Hi Internals,

There are bugs #79276 <https://bugs.php.net/bug.php?id=79276> and
#80340
<https://bugs.php.net/bug.php?id=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 <https://github.com/php/php-src/pull/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


Thread (7 messages)

« previous php.internals (#114016) next »