-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Firebird PDO preprocessing sql #4920
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
Conversation
Fixed verification of identifiers. Comments are added.
Can’t anyone check this code? This is a very nasty mistake. It really prevents you from switching to pdo-firebird from ibase extension. As it turned out, the error also manifests itself in the {CREATE [OR ALTER] | ALTER} {PROCEDURE | FUNCTION | PACKAGE | TRIGGER} if they contain marked variables (and they are there at every step). |
Thanks for the PR! It looks basically good to me, but I'm unsure regarding the ported code from the Firebird code base. The respective file is covered by the Initial Developer's Public License Version 1.0, and I'm not sure if we're allowed to use that ported code. Could someone please clarify? |
The source code has been significantly redesigned. The fact is that this piece of code was originally written in C ++. Here I had to rewrite it in C. However, I will clarify this question with the Firebird developers. |
Any news here? PHP 8.0.0RC1 is going to be tagged in a week, and it would be good to merge this before that tag. |
You can read a discussion of this topic here. |
https://www.mail-archive.com/[email protected]/msg19101.html# looks good enough to me. I'll merge this PR ASAP, if nobody beats me to it. Thanks again! |
Thank you very much, @sim1984! |
This patch fixes some problems with preprocessing SQL queries.
These problems are also described in https://bugs.php.net/bug.php?id=64937
The code below clearly shows the problems described.
The SQL preprocessing code has been ported from Firebird to handle EXECUTE STATEMENT. See Statement::preprocess() and getToken() https://github.com/FirebirdSQL/firebird/blob/master/src/jrd/extds/ExtDS.cpp#L1928 to 2166