mysql.proc contains one record per
Stored Procedure or Stored Function. Note that this table design
is a mix of relational and non relational (blob) content:
Attributes that are part of the interface of a stored procedure or function (like its name, return type, etc), or that are global to the object (implementation language, deterministic properties, security properties, sql mode, etc) are stored with a dedicated column in the
The body of a stored procedure or function, which consists of the original code expressed in SQL, including user comments if any, is stored as-is preserving the original indentation in blob column 'body'.
This design choice allows the various attributes to be representedin a format that is easy to work with (relational model), while allowing a lot of flexibility for the content of the body.
A minor exception to this is the storage of the parameters of a
stored procedure or function (which are part of its interface)
inside the blob column
param_list (instead of
using a child
mysql.procs_priv describes privileges
granted for a given Stored Procedure or Stored Function in
The code used to encapsulate database access is: