Bug #111690 Expose number of table objects with triggers in table cache
Submitted: 7 Jul 2023 8:32 Modified: 7 Jul 2023 8:33
Reporter: Dmitry Lenev (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[7 Jul 2023 8:32] Dmitry Lenev
Description:
This is a follow-up to my contribution for the bug #44625 "Triggers should not be loaded on SELECTs".

I would like to contribute another patch on top of one provided in #44625 which adds Open_tables_with_triggers status variable, which shows number of TABLE objects with fully loaded triggers in Table Cache. Having such variable in addition to Table_open_cache_triggers_hits and Table_open_cache_triggers_misses variables should allow user to better understand how well caching for TABLE objects with triggers work and if the limits on such objects needs to be adjusted.

How to repeat:
Apply contributed patch for bug#44625 "Triggers should not be loaded on SELECTs" to recent snapshot of 8.0 (e.g. 8.0.33), observe that there is no way to see current number of TABLE objects with fully loaded triggers in Table Cache (similar to Open_tables status variable for example).

Suggested fix:
Apply contributed patch adding Open_tables_with_triggers status variable.
[7 Jul 2023 8:33] MySQL Verification Team
Hello Dmitry,

Thank you for the feature request.

Sincerely,
Umesh
[7 Jul 2023 8:36] Dmitry Lenev
Patch adding Open_tables_with_triggers status variable.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: ps-8624-bug111690-contrib.patch (text/x-patch), 29.04 KiB.

[7 Jul 2023 9:04] MySQL Verification Team
Thank you for the Contribution.

Sincerely,
Umesh