Bug #103804 | Show global status return wrong results due to thd's status double aggregated | ||
---|---|---|---|
Submitted: | 26 May 2021 0:56 | Modified: | 31 May 2021 17:12 |
Reporter: | Baolin Huang | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Information schema | Severity: | S3 (Non-critical) |
Version: | 8.0.24 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 May 2021 0:56]
Baolin Huang
[31 May 2021 17:12]
MySQL Verification Team
Hello Baolin Huang, Thank you for the report and feedback. regards, Umesh
[6 Jun 6:19]
ChangAo Chen
This patch may fix this bug: diff --git a/storage/perfschema/pfs_visitor.cc b/storage/perfschema/pfs_visitor.cc index e64884fe057..524cd7f54d4 100644 --- a/storage/perfschema/pfs_visitor.cc +++ b/storage/perfschema/pfs_visitor.cc @@ -1203,7 +1203,8 @@ void PFS_connection_status_visitor::visit_account(PFS_account *pfs) { void PFS_connection_status_visitor::visit_thread(PFS_thread *) {} void PFS_connection_status_visitor::visit_THD(THD *thd) { - add_to_status(m_status_vars, &thd->status_var); + if (!thd->status_var_aggregated) + add_to_status(m_status_vars, &thd->status_var); } PFS_instance_wait_visitor::PFS_instance_wait_visitor() = default;