-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Deallocate prepared statements #6665
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
Deallocate prepared statements #6665
Conversation
Thank you for contribution! This is not a bug fix, so this should go to |
a4e2442
to
3bd2a24
Compare
@kenjis that's done, I've rebased the PR to 4.3 branch |
@fpoy There are four commits made by Paul and me. Please drop them. |
45334d0
to
95bbed1
Compare
@kenjis it's done, there are only my commits left on the branch... |
Thank you. The commits are okay.
|
in
Would that be sufficient ? |
Please add about this enhancement in the Enhancements section: |
https://codeigniter4.github.io/CodeIgniter4/database/queries.html#close It seems the
|
6281a97
to
d258714
Compare
LGMT The only thing is you might add to the test to check that the statement is actually cleared. For MySQL: SHOW GLOBAL STATUS LIKE '%prepared_stmt_count%';
# 0 SQLITE https://www.sqlite.org/c3ref/stmt_status.html Postgres https://www.postgresql.org/docs/current/view-pg-prepared-statements.html |
This is looking great everyone. Thanks for all the collaboration! |
…g prepared statement
e9f022b
to
f859e46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I can't tell if that last thread is resolved yet.
Whoever merges: please squash this one.
Fixes #1256
Description
Implement a common method in each database connector to destroy the prepared query when we're done with it
Cf Issue #1256 : TODO Deallocate prepared statements
To closes a prepared statement :
https://www.php.net/manual/en/mysqli-stmt.close.php
https://www.php.net/manual/en/function.oci-free-statement.php
the SQL DEALLOCATE statement can be used for that purpose :
https://www.php.net/manual/en/function.pg-prepare.php
https://www.postgresql.org/docs/8.1/sql-deallocate.html
https://www.php.net/manual/en/sqlite3stmt.close.php
https://www.php.net/manual/en/function.sqlsrv-free-stmt.php
Checklist: