|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-03-03 23:14 UTC] john@php.net
-Assigned To:
+Assigned To: john
[2021-03-03 23:17 UTC] john@php.net
-PHP Version: 7.3.27
+PHP Version: 7.4.3
[2021-03-05 08:35 UTC] nikic@php.net
-Status: Assigned
+Status: Feedback
[2021-03-05 08:35 UTC] nikic@php.net
[2021-03-05 12:32 UTC] dharman@php.net
[2021-03-05 15:30 UTC] nikic@php.net
[2021-03-14 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 21:00:02 2025 UTC |
Description: ------------ There is a bug in the pdo_mysql driver with PDO::ATTR_EMULATE_PREPARES set to false that prevents a query such as `SHOW WARNINGS` from working properly. I'm intending on writing a patch to fix this issue once I dig into it further, but I wanted to get the bug report live in case anyone else runs into this issue in the wild (e.g. Laravel disables emulated prepares for their DB implementation on top of PDO). Test script: --------------- <?php $db = new \PDO(...$params); $db->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false); $result = $db->query('SHOW WARNINGS')->fetchAll(); // causes a 2014 client error $db = new \PDO(...$params); $db->setAttribute(\PDO::ATTR_EMULATE_PREPARES, true); $result = $db->query('SHOW WARNINGS')->fetchAll(); // works