1310
MariaDBerrorstored-procedureshigh confidence
Incorrect number of arguments for procedure
Production Risk
Low — call fails; no data changed.
What this means
CALL was made with a different number of arguments than the stored procedure or function signature expects.
Why it happens
- 1Calling a procedure with too few or too many arguments
- 2Schema changed after the application code was written
How to reproduce
trigger — this will error
trigger — this will error
CALL my_proc(1, 2); -- procedure expects 3 args
expected output
ERROR 1310 (42000): Incorrect number of arguments for PROCEDURE db.my_proc; expected 3, got 2
Fix
Check procedure signature
Check procedure signature
SHOW CREATE PROCEDURE my_proc;
Why this works
Reveals the expected parameter list.
Sources
Official documentation ↗
MySQL 8.0 — 1310 ER_SP_WRONG_NO_OF_ARGS
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev