3073
MariaDBERRORNotableSchemaHIGH confidence

Incorrect use of Performance Schema table

Production Risk

Low — only the attempted write fails; existing data is unaffected.

What this means

An operation was attempted on a Performance Schema table that is not permitted, such as INSERT, UPDATE, or DELETE on a read-only table.

Why it happens
  1. 1Attempting DML on a performance_schema table that does not support writes.
  2. 2Using TRUNCATE on a performance_schema table that requires a specific reset mechanism.
How to reproduce
trigger — this will error
trigger — this will error
INSERT INTO performance_schema.events_waits_history VALUES (...);

expected output

ERROR 3073 (HY000): Use of performance_schema.events_waits_history is not allowed.

Fix

Use the correct performance_schema reset mechanism

Use the correct performance_schema reset mechanism
TRUNCATE TABLE performance_schema.events_waits_summary_by_thread_by_event_name;

Why this works

Some PS tables support TRUNCATE to reset counters.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3073 ER_WRONG_PERFSCHEMA_USAGE2

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors