def full_datatype_to_mysql(d: str) -> str:
    """Converts a full datatype, e.g. INT, VARCHAR(10), VARCHAR(MAX), to a
    MySQL equivalent."""
    d = d.upper()
    (s, length) = split_long_sqltype(d)
    if d in ["VARCHAR(MAX)", "NVARCHAR(MAX)"]:
        # http://wiki.ispirer.com/sqlways/mysql/data-types/longtext
        return "LONGTEXT"
    elif d in ["VARBINARY(MAX)"] or s in ["IMAGE"]:
        # http://wiki.ispirer.com/sqlways/mysql/data-types/varbinary
        return "LONGBLOB"
    else:
        return d
def full_datatype_to_mysql ( d : str ) -> str : d = d . upper ( ) ( s , length ) = split_long_sqltype ( d ) if d in [ "VARCHAR(MAX)" , "NVARCHAR(MAX)" ] : return "LONGTEXT" elif d in [ "VARBINARY(MAX)" ] or s in [ "IMAGE" ] : return "LONGBLOB" else : return d
Converts a full datatype, e.g. INT, VARCHAR(10), VARCHAR(MAX), to a
    MySQL equivalent.