Why does CAST(1 AS SIGNED INTEGER) return a BIGINT on MySQL?
As you can see on https://www.w3schools.com/sql/func_mysql_cast.asp

SIGNED    Converts value to SIGNED (a signed 64-bit integer)
UNSIGNED  Converts value to UNSIGNED (an unsigned 64-bit integer)

And from the official MySQL documentation: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html

MySQL supports arithmetic with both signed and unsigned 64-bit values. For numeric operators (such as + or -) where one of the operands is an unsigned integer, the result is unsigned by default (see Section 12.6.1, “Arithmetic Operators”). To override this, use the SIGNED or UNSIGNED cast operator to cast a value to a signed or unsigned 64-bit integer, respectively.

So looks like the CAST output will actually be a 64 bits integer when you use SIGNED or UNSIGNED datatypes.