php.net |  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
 [2011-09-27 23:26 UTC] cyberspice at cyberspice dot org dot uk
Description:
------------
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 
false.

I attach a patch.




Patches

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

History

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