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

Issue With Prepared Statements #36

Open
aldobarr opened this issue Aug 21, 2024 · 1 comment
Open

Issue With Prepared Statements #36

aldobarr opened this issue Aug 21, 2024 · 1 comment

Comments

@aldobarr
Copy link

I recently reported an issue with named parameter bindings to the snowflake pdo driver but after a bit more digging it looks like the issue might actually be with this package.

Please see this issue for full details:
snowflakedb/pdo_snowflake#396

But to summarize, it looks like named parameter binds are not working as they should be. Come to think of it the reason it most likely didn't break in our production is because our prod environment is not yet on 1.2.5. So potentially something about 1.2.5 broke it.

While debugging this and going through this package's code during execution, it looks like the package is trying to handle the parameters itself instead of passing them to the statement to let PDO handle it...? And only when positional params are used otherwise bindings are entirely ignored...? It seems very strange to me the way this package is implementing PDO.

@yoramdelangen
Copy link
Collaborator

Your correct. Please note in the past we only had a ODBC integration and not the PDO Snowflake. This does not work in the ODBC integration either so I think the PDO Snowflake package uses the ODBC connector internally.
We didn't find a workaround yet for this problem, and avoid using named parameters. A workaround could be manipulation of the query string just as we are doing with the positional one, but more manual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants