From 8cedfdf7e3bd0ca3a9da3fe65ba8dae6c8b8a803 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 3 Aug 2025 14:54:22 +0200 Subject: [PATCH] MDEV-34817 perfschema.lowercase_fs_off fails on buildbot initialize counters when constructing a new PFS_program object The test fails because a newly created routine can get a performance schema slot freed by a routine dropped in an earlier test. The counters of a reused slot are not reset, so the new routine shows the old routine's statistics. --- storage/perfschema/pfs_program.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/perfschema/pfs_program.cc b/storage/perfschema/pfs_program.cc index b10f00b7d52..2ef94c1a922 100644 --- a/storage/perfschema/pfs_program.cc +++ b/storage/perfschema/pfs_program.cc @@ -246,6 +246,8 @@ search: pfs->m_schema_name_length= schema_name_length; pfs->m_enabled= is_enabled; pfs->m_timed= is_timed; + pfs->m_stmt_stat.reset(); + pfs->m_sp_stat.reset(); /* Insert this record. */ pfs->m_lock.dirty_to_allocated(& dirty_state);