Under User-Defined Variables, the MySQL manual documents:
User variables can be assigned a value from a limited set of data types: integer, decimal, f
User variables use the same internal data types that MySQL uses for computations on column values. These internal types are big enough for all data types supported by MySQL.
ZEROFILL
, as that is an additional property of the column, not of the data type itself. Furthermore, integer user variables do not have a width; when converted to text, they use just as many digits as needed.LONGTEXT
value, if max_allowed_packet
is large enough and you have enough memory. However, there is an undocumented limit of 16 MB for user variables, mentioned in bug 31898.