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

Enabling ATTR_EMULATE_PREPARES breaks binary bindings #63

Closed
david-garcia-garcia opened this issue Sep 9, 2015 · 2 comments
Closed

Comments

@david-garcia-garcia
Copy link

Sample script here: http://pastebin.com/qXBJYDiP

Updating binary columns with EMULATE_PREPARES turned OFF works,

From the profiler I can see that the queries it is running against the server are messed up for binary columns with EMULATE_PREPARES ON.

Without emulate prepares:

exec sp_executesql N'INSERT INTO TESTTABLE VALUES(@p1)',N'@p1 varbinary(max)',0x61736467617364676173646773616467

With emulate prepares:

INSERT INTO TESTTABLE VALUES('asdgasdgasdgsadg')

When it should be doing:

INSERT INTO TESTTABLE VALUES(0x61736467617364676173646773616467)

I'm running latest version of the PDO driver.

@david-garcia-garcia
Copy link
Author

This is still an issue in the PHP7 driver.

The test runs first a successful insert statement (with emulate prepares off), the tries the same thing with (emulate prepares on) resulting in an exception.

@david-garcia-garcia
Copy link
Author

This is fixed in the latest release. Thanks!

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

2 participants