Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent PDO resources might be wrong w.r.t. PDO::ATTR_STATEMENT_CLASS #5202

Open
mxw opened this issue Apr 23, 2015 · 1 comment
Open

Comments

@mxw
Copy link
Contributor

mxw commented Apr 23, 2015

According to the PHP manual, persistent PDO resources don't support PDO_ATTR_STATEMENT_CLASS (http://php.net/manual/en/pdo.setattribute.php).

HHVM's implementation of PDO seems to want to agree with this behavior, since there's a check for an `is_persistent' in the implementation of setattribute; however, that flag is not actually ever set anywhere.

This shouldn't be too complicated to resolve:
1/ Make sure PHP5's behavior agrees with the doc; if not, we can probably just keep the behavior also.
2/ If so, check for persistence another way (or set `is_persistent').
3/ A bunch of cleanup is possible if we match this behavior; e.g., we can probably kill persistent saving/restoring of the actual PDOResource objects, we can move the clsname field out of PDOConnection and into PDOResource as a runtime data structure, etc.

@bauerj
Copy link
Contributor

bauerj commented Apr 25, 2015

I thought this has been fixed in #3414

@aorenste aorenste removed the wishlist label Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants