| Bug #110523 | expose the prepare statement map size to public for trouble shooting | ||
|---|---|---|---|
| Submitted: | 28 Mar 2023 3:32 | Modified: | 28 Mar 2023 6:36 |
| Reporter: | Fangxin Flou (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Prepared statements | Severity: | S4 (Feature request) |
| Version: | all, 5.7, 8.0 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | prepare statement | ||
[28 Mar 2023 6:36]
MySQL Verification Team
Hello Fangxin Flou, Thank you for the feature request. regards, Umesh

Description: Some application are leaking prepared statement, to help us to find out which session are continually leaking, please expose the prep_map size to public. How to repeat: N/A Suggested fix: diff --git a/sql/sql_class.h b/sql/sql_class.h index 8050468db15..38a33f77633 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -511,6 +511,8 @@ class Prepared_statement_map { void reset(); + size_t size() { return st_hash.size(); }; + ~Prepared_statement_map(); private: