Syntax:
SHOW PROCEDURE CODE proc_name

This statement is a MySQL extension that is available only for servers
that have been built with debugging support. It displays a
representation of the internal implementation of the named stored
procedure. A similar statement, SHOW FUNCTION CODE, displays
information about stored functions (see [HELP SHOW FUNCTION CODE]).

To use either statement, you must be the user named as the routine
DEFINER, have the SHOW_ROUTINE privilege, or have the SELECT privilege
at the global level.

If the named routine is available, each statement produces a result
set. Each row in the result set corresponds to one "instruction" in the
routine. The first column is Pos, which is an ordinal number beginning
with 0. The second column is Instruction, which contains an SQL
statement (usually changed from the original source), or a directive
which has meaning only to the stored-routine handler.

URL: https://dev.mysql.com/doc/refman/8.0/en/show-procedure-code.html

