|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55802 PDO_ATTR_EMULATE_PREPARES not supported for getAttribute() in pdo_mysql
Submitted: 2011-09-27 23:26 UTC Modified: 2017-10-24 18:02 UTC
From: cyberspice at cyberspice dot org dot uk Assigned:
Status: Duplicate Package: PDO MySQL
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: cyberspice at cyberspice dot org dot uk
New email:
PHP Version: OS:


 [2011-09-27 23:26 UTC] cyberspice at cyberspice dot org dot uk
I was trying to diagnose another issue and testing with PDO_ATTR_EMULATE_PREPARES 
enabled and disabled and discovered that PDO::getAttribute() for mysql doesn't 
support it. 

Checking the source I see that it is a synonym for PDO_MYSQL_ATTR_DIRECT_QUERY. 
However both are supported in PDO::setAttribute() but only 
PDO_MYSQL_ATTR_DIRECT_QUERY is supported in getAttribute(). It always returns 

I attach a patch.


pdo_attr_emulate_prepares_getattribute.patch (last revision 2011-09-27 23:27 UTC by cyberspice at cyberspice dot org dot uk)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-04 15:57 UTC]
-Assigned To: +Assigned To: mysql
 [2014-01-01 12:43 UTC]
-Package: PDO related +Package: PDO MySQL
 [2017-10-24 08:07 UTC]
-Status: Assigned +Status: Open -Assigned To: mysql +Assigned To:
 [2017-10-24 18:02 UTC]
-Status: Open +Status: Duplicate
 [2017-10-24 18:02 UTC]
This was fixed with #68371.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 16:01:30 2024 UTC