1300
MariaDBerrorstored-procedureshigh confidence

Redefining label

Production Risk

Low — compile-time error; routine not created.

What this means

A label was declared twice within the same stored routine scope.

Why it happens
  1. 1Copy-paste error creating duplicate label names in a procedure
How to reproduce
trigger — this will error
trigger — this will error
CREATE PROCEDURE p() BEGIN lbl: BEGIN END; lbl: BEGIN END; END;

expected output

ERROR 1300 (42000): Redefining label 'lbl'

Fix

Use unique label names

Why this works

Give each block or loop a distinct label within the same scope.

Sources
Official documentation ↗

MySQL 8.0 — 1300 ER_SP_LABEL_REDEFINE

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

← All MariaDB errors