✏️ 正在编辑: protocol.cpython-312.pyc
路径:
/var/opt/nydus/ops/mysql/connector/aio/__pycache__/protocol.cpython-312.pyc
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
� ��'j(1 � �� � d Z dgZddlZddlmZmZmZmZmZ ddl m Z mZ ddlm Z mZmZ ddlmZ dd lmZmZmZ dd lmZmZmZmZ ddlmZmZ dd lmZ ddl m!Z!m"Z" ddl#m$Z$ G d� de� Zy)z,Implements the MySQL Client/Server protocol.� MySQLProtocol� N)�Any�Dict�List�Optional�Tuple� )� ClientFlag� ServerCmd)�InterfaceError�ProgrammingError� get_exception)�logger)�DEFAULT_CHARSET_ID�DEFAULT_MAX_ALLOWED_PACKETr )�BinaryProtocolType�DescriptionType� EofPacketType� HandShakeType)�lc_int�read_lc_string_list� )�MySQLSocket)�MySQLAuthPlugin�get_auth_plugin)�"MySQLCachingSHA2PasswordAuthPluginc � � e Zd ZdZe ddededededee d ed ee ee f deeef fd�� Z eded eddddddf dedededee dedededee dee dee eef ded ed ee ee f deeef fd�� Z ddedee dededee deeeedf ee f fd�Z d dedeedf dedee deeeee df ee f f d�Zy)!r zSImplements MySQL client/server protocol. Create and parses MySQL packets. NF� auth_data�username�password�auth_plugin�auth_plugin_class�ssl_enabled� plugin_config�returnc �@ � |s|dk( rdt |||�� fS |�i } t ||� |||�� } |j | fi |��}|�t d|j � �� �t t |� � |z }||fS # t t f$ r} t d| � �� | �d} ~ ww xY w)a Prepare the first authentication response. Args: auth_data: Authorization data from initial handshake. username: Account's username. password: Account's password. client_flags: Integer representing client capabilities flags. auth_plugin: Authorization plugin name. auth_plugin_class: Authorization plugin class (has higher precedence than the authorization plugin name). ssl_enabled: Whether SSL is enabled or not. plugin_config: Custom configuration to be passed to the auth plugin when invoked. The parameters defined here will override the ones defined in the auth plugin itself. Returns: auth_response: Authorization plugin response. auth_strategy: Authorization plugin instance created based on the provided `auth_plugin` and `auth_plugin_class` parameters. Raises: InterfaceError: If authentication fails or when got a NULL auth response. � � )r# NzFailed authentication: z8Got NULL auth response while authenticating with plugin )r r � auth_response� TypeErrorr �namer �len) r r r r! r"