1957
MariaDBERRORCommonStored RoutinesHIGH confidence

Incorrect stored procedure name

Production Risk

None — DDL is rejected.

What this means

The name given to a stored procedure or function violates MySQL's identifier naming rules (e.g., it is too long, contains illegal characters, or is a reserved word without quoting).

Why it happens
  1. 1Procedure name exceeds 64 characters.
  2. 2Procedure name starts with a digit or contains illegal characters.
  3. 3Using a reserved keyword as a routine name without backtick quoting.
How to reproduce
trigger — this will error
trigger — this will error
CREATE PROCEDURE 123bad_name() BEGIN END;

expected output

ERROR 1957 (42000): Incorrect stored procedure name '123bad_name'.

Fix

Use a valid MySQL identifier as the procedure name

Use a valid MySQL identifier as the procedure name
CREATE PROCEDURE calc_total() BEGIN END;

Why this works

Identifiers must start with a letter or underscore and contain only alphanumeric characters, underscores, or dollar signs.

Sources
Official documentation ↗

MySQL 8.0 — 1957 ER_SP_WRONG_NAME

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

← All MariaDB errors