Skip to content

MDEV-34817: perfschema.lowercase_fs_off fails on buildbot#4941

Open
kjarir wants to merge 1 commit intoMariaDB:11.8from
kjarir:MDEV-34817-fix-test-order
Open

MDEV-34817: perfschema.lowercase_fs_off fails on buildbot#4941
kjarir wants to merge 1 commit intoMariaDB:11.8from
kjarir:MDEV-34817-fix-test-order

Conversation

@kjarir
Copy link
Copy Markdown
Contributor

@kjarir kjarir commented Apr 14, 2026

Problem

When DROP DATABASE or DROP PACKAGE BODY is executed, sp_drop_db_routines() was not calling MYSQL_DROP_SP for Oracle-style package body sub-routines. This caused stale ghost rows to remain in events_statements_summary_by_program, making the MTR test perfschema.lowercase_fs_off fail non-deterministically when run after compat/oracle.sp-package.

Fix

  1. In sp_drop_routine_internal: iterate sub-routines and call MYSQL_DROP_SP before removing the package from cache.
  2. In sp_drop_db_routines: use the thread's package body cache to identify and clear sub-routines when a package body is dropped during DROP DATABASE.

Testing

  • Added regression test: perfschema.mdev34817
  • Verified with: ./mtr --no-reorder compat/oracle.sp-package perfschema.lowercase_fs_off --repeat=5
  • Full perfschema suite passes

References

Closes MDEV-34817
Closes MDEV-35282

…tats on DROP DATABASE/DROP PACKAGE BODY

When DROP DATABASE or DROP PACKAGE BODY is executed, sp_drop_db_routines()
was not calling MYSQL_DROP_SP for Oracle-style package body sub-routines.
This caused stale ghost rows to remain in events_statements_summary_by_program,
making the MTR test perfschema.lowercase_fs_off fail non-deterministically.

Fix:
1. In sp_drop_routine_internal: iterate sub-routines and call MYSQL_DROP_SP
   before removing the package from cache.
2. In sp_drop_db_routines: use the thread's package body cache to identify
   and clear sub-routines when a package body is dropped during DROP DATABASE.

Includes regression test perfschema.mdev34817.
Also stabilizes perfschema.lowercase_fs_off by ensuring clean state.
@kjarir kjarir force-pushed the MDEV-34817-fix-test-order branch from f8f310c to 4b18863 Compare April 14, 2026 17:59
@kjarir kjarir changed the title MDEV-34817: Fix Performance Schema not clearing package sub-routine stats on DROP DATABASE/DROP PACKAGE BODY MDEV-34817: perfschema.lowercase_fs_off fails on buildbot Apr 14, 2026
@grooverdan grooverdan self-assigned this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants