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: 2014-01-01 12:43 UTC
From: cyberspice at cyberspice dot org dot uk Assigned: mysql
Status: Assigned Package: PDO MySQL
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID:
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
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
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Fri Mar 24 20:01:40 2017 UTC