Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 11.7(EOL)
-
None
Description
This MTR test:
--source include/default_charset.inc
|
|
SET sql_mode=ORACLE; |
CREATE DATABASE db1; |
DELIMITER $$;
|
CREATE PACKAGE db1.pkg1 AS |
PROCEDURE p1(); |
END; |
$$
|
|
CREATE PACKAGE BODY db1.pkg1 AS |
PROCEDURE p1() AS |
BEGIN |
NULL; |
END; |
END; |
$$
|
|
DELIMITER ;$$
|
|
CALL db1.pkg1.p1();
|
|
DROP DATABASE db1; |
|
|
SELECT object_type, object_schema, object_name |
FROM performance_schema.events_statements_summary_by_program |
WHERE object_type='procedure' AND LOWER(object_schema)='db1'; |
prints the following output:
object_type object_schema object_name
|
PROCEDURE db1 pkg1.p1
|
Notice, the database db1 is already dropped. So the statistics should not contain information about its objects.
Attachments
Issue Links
- relates to
-
MDEV-34817 perfschema.lowercase_fs_off fails on buildbot
-
- Stalled
-
The problem happens because when a package procedure (or a package function) is executed, performance schema remembers it as:
type='procedure'
db='db'
name='pkg1.p1'
When a DROP DATABASE happens, performance schema removes from its cached only a record like this:
type='package body'
db='db'
name='pkg1'
To make it work properly, when removing a package body from the perfschema cache, it should parse the package body and remove its all routines.
This looks quite complex.
Another option is to remember package routines in perfschema as their owner package body. So when db.pkg1.p1 is executed, perfschema remembers it as:
type='package body'
db='db'
name='pkg1'
But this will worsen the statistics.