15.2.4 Derived Attribute Storage

Some critical attributes, such as SQL_MODE,
are explicitly part of the storage format.

Other attributes, that also impact significantly the behavior in
general of Stored Programs, can be implicitly
derived from other properties of the storage layer.
In particular:

The USE <database> in effect for a
stored program is the schema the stored
object belongs to.

The statement DECLARE v CHAR(10) does not
intrinsically convey any notion of character set or
collation. The character set and collation of this local
variable, in a stored program, derives from the character
set and collation of the schema the
stored object belongs to.