| Bug #101118 | Variable 'mysql_service_mysql_psi_system_v1' has unused definition | ||
|---|---|---|---|
| Submitted: | 11 Oct 2020 2:10 | Modified: | 12 Oct 2020 13:21 |
| Reporter: | Li Zhong | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 8.0 | OS: | Ubuntu |
| Assigned to: | CPU Architecture: | Any | |
[12 Oct 2020 13:21]
MySQL Verification Team
Hi Mr. Zhong, Thank you for your bug report and for your observation. That variable is required for the future changes that will be made to the Performance_Schema.

Description: Hi, I'm looking at MySQL8 source code when I find that in mysqld_main (sql/mysqld.cc), with the call chain component_infrastructure_init()->initialize_minimal_chassis()->minimal_chassis_init(), it assigns variable 'mysql_service_mysql_psi_system_v1' with a new value as: mysql_service_mysql_psi_system_v1 = &imp_mysql_minimal_chassis_mysql_psi_system_v1; However, after this assignment, this new value is used nowhere and then covered in component_infrastructure_init() as: mysql_service_mysql_psi_system_v1 = reinterpret_cast<SERVICE_TYPE(mysql_psi_system_v1) *>(system_service); which means the value assigned before is defined but no used. So I wonder if there is a potential bug behind it or it's just a redundancy assignment? Thanks for your time How to repeat: This exist in mysql-cluster-8.0.21