Skip to content

Fix bug 77490 https://bugs.php.net/bug.php?id=77490 #4288

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

Closed
wants to merge 3 commits into from

Conversation

Danack
Copy link
Contributor

@Danack Danack commented Jun 19, 2019

I haven't been able to test against the full suite of pdo extensions.

Arguably maybe could only target 7.4 as it's a little bit edge case, i.e. only affects broken code.

@nikic
Copy link
Member

nikic commented Jun 19, 2019

Test failures on Travis legit -- needs test fixes.

@Danack
Copy link
Contributor Author

Danack commented Jun 19, 2019

The test pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt failed due to a new warning being shown. I think this is a separate bug that this patch also fixes.

Same for test ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt, it also now has a new informative warning, instead of just failing silently.

So for those two, the tests have been updated.

The test pdo_mysql_prepare_native_column.phpt is failing because the warning is shown twice. I think it needs to be removed from somewhere in the mysql driver....so I'll have to track that down.

My guess is that the ext/pdo_pgsql/tests/bug71573.phpt test is also the same - a duplicated error message, but I'll need to get pgsql setup to test that.

@Danack
Copy link
Contributor Author

Danack commented Jun 21, 2019

So, the error handling in PDO is a bit of a nightmare.

The error is being handled once in rewrite_name_to_position line 138:

pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined");

However this appears to leave the error code set. I thought the latest commit should clear it, but it doesn't appear to be, and I've run out of energy for now.

@krakjoe
Copy link
Member

krakjoe commented Oct 3, 2019

@Danack can we get a status update please ?

@Llbe
Copy link

Llbe commented Apr 21, 2020

This bug may be relevant here too: https://bugs.php.net/bug.php?id=79131.

@nikic
Copy link
Member

nikic commented Dec 22, 2020

This issue has since been resolved.

@nikic nikic closed this Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants