def get_db_minor_version()

in src/dma/collector/workflows/readiness_check/_mysql/helpers.py [0:0]


def get_db_minor_version(db_version: str) -> int:
    version_match = mysql_version_regex.match(db_version)
    if not version_match:
        return -1
    version = version_match.group("version")
    split = version.split(".")
    if db_version.startswith("5"):
        if len(split) > 2:
            return int(split[2])
    elif len(split) > 1:
        return int(split[1])
    return -1