1473
MariaDBERRORCommonStored RoutinesHIGH confidence

Cannot load routine — mysql.proc is missing or corrupt

Production Risk

Critical — all stored routines may be unavailable until repaired.

What this means

ER_SP_PROC_TABLE_CORRUPT (1473, SQLSTATE HY000) is raised when MySQL cannot load a stored routine because the mysql.proc table is missing, corrupt, or contains invalid data.

Why it happens
  1. 1mysql.proc table was accidentally dropped or truncated
  2. 2Corruption in the mysql schema after a crash
  3. 3MySQL upgrade that left mysql.proc in an inconsistent state
How to reproduce
trigger — this will error
trigger — this will error
CALL my_proc();
-- When mysql.proc is corrupt or missing

expected output

ERROR 1473 (HY000): Failed to load routine my_proc. The table mysql.proc is missing, corrupt, or contains bad data (internal code -1)

Fix

Run mysql_upgrade to repair the mysql schema

Run mysql_upgrade to repair the mysql schema
-- From command line:
mysql_upgrade -u root -p

-- Or check and repair the proc table:
mysqlcheck --repair mysql proc -u root -p

Why this works

mysql_upgrade recreates or repairs system tables including mysql.proc.

What not to do

Version notes
MySQL 8.0

mysql.proc was replaced by the data dictionary; this error is specific to MySQL 5.x.

Sources
Official documentation ↗

MySQL 8.0 — 1473 ER_SP_PROC_TABLE_CORRUPT

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

← All MariaDB errors