/var/opt/nydus/ops/mysql/connector/aio/__pycache__
NameSizeModeActions
abstracts.cpython-312.pyc1155400644editdlrm
authentication.cpython-312.pyc131520644editdlrm
charsets.cpython-312.pyc173430644editdlrm
connection.cpython-312.pyc708760644editdlrm
cursor.cpython-312.pyc601950644editdlrm
logger.cpython-312.pyc3510644editdlrm
network.cpython-312.pyc305960644editdlrm
pooling.cpython-312.pyc302760644editdlrm
protocol.cpython-312.pyc115140644editdlrm
utils.cpython-312.pyc59830644editdlrm
_decorating.cpython-312.pyc43120644editdlrm
__init__.cpython-312.pyc4930644editdlrm
Edit: /var/opt/nydus/ops/mysql/connector/aio/__pycache__/protocol.cpython-312.pyc (11514B)
N j(1dZdgZddlZddlmZmZmZmZmZddl m Z m Z ddl m Z mZmZddlmZdd lmZmZmZdd lmZmZmZmZdd lmZmZd d lmZd dl m!Z!m"Z"d dl#m$Z$GddeZy)z,Implements the MySQL Client/Server protocol. MySQLProtocolN)AnyDictListOptionalTuple) ClientFlag ServerCmd)InterfaceErrorProgrammingError get_exception)logger)DEFAULT_CHARSET_IDDEFAULT_MAX_ALLOWED_PACKETr)BinaryProtocolTypeDescriptionType EofPacketType HandShakeType)lc_intread_lc_string_list) MySQLSocket)MySQLAuthPluginget_auth_plugin)"MySQLCachingSHA2PasswordAuthPluginc eZdZdZe ddededededeed ed ee ee fd e ee ffd Z eded eddddddf dedededeededededeedeedee eefded ed ee ee fd e ee ffdZ ddedeedededeed e ee edfeeff dZ d dede edfdedeed e ee eedfeeff dZy)!rzSImplements MySQL client/server protocol. Create and parses MySQL packets. NF auth_datausernamepassword auth_pluginauth_plugin_class ssl_enabled plugin_configreturnc@|s|dk(rdt|||fS|i} t|||||}|j|fi|}|t d|j t t||z}||fS#ttf$r} t d| | d} ~ wwxYw)aPrepare 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 )rr auth_response TypeErrorr namerlen) rrr r!r"r#r$ auth_strategyr)errs M/opt/nydus/tmp/pip-target-a90h98xg/lib/python/mysql/connector/aio/protocol.pyauth_plugin_first_responsez(MySQLProtocol.auth_plugin_first_response:sDK2->(    M KKOK9JK( M8M77 S]SM   ',,-/  s=12]B m++>* K #:3%!@As J Ks(A::B BBr handshakedatabasecharset client_flagsmax_allowed_packet conn_attrsis_change_user_requestc \|j} g}| rtjdtjd| tdd|j d tdd |xs|d}tjd || rB|jtjd t| d tj| n9d }|jtjd|t| d |||| tj|d||||| | \}}|j||jtj||| r%|jtjd||t j"zr"|j|jdz|t j$zr&| $|jtj'| dj)||fS#t t f$r}td|d dd}~wwxYw)aMake a MySQL Authentication packet. Args: handshake: Initial handshake. username: Account's username. password: Account's password. database: Initial database name for the connection charset: Client charset (see [2]), only the lower 8-bits. client_flags: Integer representing client capabilities flags. max_allowed_packet: Maximum packet size. auth_plugin: Authorization plugin name. auth_plugin_class: Authorization plugin class (has higher precedence than the authorization plugin name). conn_attrs: Connection attributes. is_change_user_request: Whether is a `change user request` operation or not. 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 one defined in the auth plugin itself. Returns: handshake_response: Handshake response as per [1]. auth_strategy: Authorization plugin instance created based on the provided `auth_plugin` and `auth_plugin_class`. Raises: ProgrammingError: Handshake misses authentication info. References: [1]: https://dev.mysql.com/doc/dev/mysql-server/latest/ page_protocol_connection_phase_packets_protocol_handshake_response.html [2]: https://dev.mysql.com/doc/dev/mysql-server/latest/ page_protocol_basic_character_set.html#a_protocol_character_set zGot a `change user` requestzStarting authorization phaseNzGot a NULL handshakerz$Handshake misses authentication infor!z-Handshake misses authentication plugin info ()z#The provided initial strategy is %sz ? *00 0  # #K$6$6$87$B C :22 2 8N  # #M$A$A*$M Nxx()=88m8$ "?uAF  s+ HH+H&&H+sockcolumnscount read_timeout.c8Kg}d}d}d} |s| |k(r ||fS|j|d{} | ddk(r|j| }d}n | ddk(rd}|j|| dd|}|||j|n| | t | | dz } 7kw)zxRead MySQL binary protocol result. Reads all or given number of binary resultset rows from the socket. Nrr)read parse_eof_parse_binary_valuesrAr) selfrNrOrPr3rQrowseofvaluesipackets r/read_binary_resultz MySQLProtocol.read_binary_results a5jc{ 99\22FayCnnV,a227F12JP{v1 F##F++ FA3s*BBA,BversioncK|}g}d}d}d} |s| |k(r ||fS|j|d{} | jdr| ddg} |j|d{} | jdr?| j| dd|j|d{} | jdr?| j| ddtdj | }n=| ddk(r| ddkr|j | }d}nd}tt | dd}|||j|n| | t| | dz } =777w) zRead MySQL text result. Reads all or given number of rows from the socket. Returns a tuple with 2 elements: a list with all rows and the EOF packet. NrsrSr<rTr)rV startswithrArrIrWbytesr) rYrNr`rPrQ_rZr[rowdatar]r^datass r/read_text_resultzMySQLProtocol.read_text_resultsn$  a5j*Sy) 99\22F  1 #yy66''8LL,#'99\#::F''8 VABZ(-chhuo>c!fQi!mnnV,-eF12J.?@{w2 G$#F++ FA-37;s:,EE /EE=EEE3BEEE)NFN)rzutf-8N)rN)__name__ __module__ __qualname____doc__ staticmethodrdstrrboolrrrrr0rrrintrMrrrrrr_rhr<r/rr4su  ,0!26:,:,:,:, :, $C= :,  :, S#X/:, uo% &:,:,x #')"<%)+//3',!26w9 w9w9w93- w9  w9  w9 w9c]w9$C=w9T#s(^,w9!%w9w9 S#X/w9 uo% &w9w9|&* ""o&" "  " sm "  U%s* +, ! "R&* ..sCx. . sm .  U8E?C' () !  .r<)%rl__all__rBtypingrrrrr constantsr r errorsr r rrprotocolrrr_MySQLProtocoltypesrrrrutilsrrnetworkrpluginsrrplugins.caching_sha2_passwordrrqr<r/r}sT:3   33-DD VU/ 5MQNQr<