[MDEV-33020] The database part is not case sensitive in SP names in PERFORMANCE_SCHEMA Created: 2023-12-14  Updated: 2023-12-14

Status: Open
Project: MariaDB Server
Component/s: Performance Schema, Stored routines
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
Fix Version/s: 10.4, 11.4

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-31531 Remove my_casedn_str() and my_caseup_... In Testing
relates to MDEV-33019 The database part is not case sensiti... Closed

 Description   

I start MariaDB with:

lower-case-table-names=0
performance-schema=1

and run this script:

CREATE OR REPLACE DATABASE DB1;
CREATE OR REPLACE DATABASE db1;
CREATE PROCEDURE DB1.sp() SELECT 'This is DB1.sp';
CREATE PROCEDURE db1.sp() SELECT 'This is db1.sp';
CALL DB1.sp();
# This is needed to reset the SP cache (a MDEV-33019 workaround)
CREATE PROCEDURE DB1.sp2() SELECT 'This is DB1.sp2';
CALL db1.sp();
select object_type, object_schema, object_name, count_star, count_statements, sum_rows_sent from performance_schema.events_statements_summary_by_program where object_type='procedure';

+-------------+---------------+-------------+------------+------------------+---------------+
| object_type | object_schema | object_name | count_star | count_statements | sum_rows_sent |
+-------------+---------------+-------------+------------+------------------+---------------+
| PROCEDURE   | db1           | sp          |          2 |                0 |             0 |
+-------------+---------------+-------------+------------+------------------+---------------+

The result looks wrong. The expected result would be two records:

  • one record for DB1.sp
  • one record for db1.sp

Generated at Thu Feb 08 10:35:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.