def cannot_process_query()

in db/mysql_scanner.py [0:0]


  def cannot_process_query(self, query_type):
    """Checks whether the given query_type can be executed for the given version of MySQL.

    Args:
      query_type: query type enum value

    Returns:
      True if the query can be executed
      False otherwise
    """
    if (query_type == "MySQL_UsersWithEmptyPasswords5_6" and
        (self.major_version > 5 or
         (self.major_version == 5 and self.minor_version > 6))):
      return True

    if (query_type == "MySQL_UsersWithEmptyPasswords5_7" and
        (self.major_version < 5 or
         (self.major_version == 5 and self.minor_version < 7))):
      return True

    return False