15.1 Overview

Stored Programs in general refers to:

  • PROCEDURE

  • FUNCTION

  • TABLE TRIGGER

  • EVENT (Starting with 5.1)

When developing, there are a couple of tools available in the server itself that are helpful. These tools are only available in builds compiled with debugging support:

  • SHOW PROCEDURE CODE

  • SHOW FUNCTION CODE

The equivalent for triggers or events is not available at this point.

The internal implementation of Stored Programs in the server depends on several components:

  • The storage layer, used to store in the database itself a program (hence the name stored program)

  • The internal memory representation of a Stored Program, used within the server implementation

  • The SQL parser, used to convert a Stored Program from its persistent representation to its internal form

  • A flow analyser, used to optimize the code representing a stored program

  • Various caches, used to improve performance by avoiding the need to load and parse a stored program at every invocation

  • The Stored Program runtime execution itself, which interprets the code of the program and executes its statements


User Comments
Sign Up Login You must be logged in to post a comment.