
    *hn                        S r SS/rSSKrSSKrSSKr SSKr\R                  \R                  \R                  \R                  S.r
SSKJrJr  SSKJr  SSKJrJrJrJrJr  S	S
KJrJrJrJrJrJr  S	SKJrJ r J!r!J"r"  SSK#J$r$J%r%  S\&S\'4S jr( " S S\5      r) " S S\)5      r* " S S\*5      r+ " S S\5      r, " S S\,5      r- " S S\,5      r.g! \ a    Sr Nf = f)zFModule implementing low-level socket communication with MySQL servers.MySQLTcpSocketMySQLUnixSocket    N)TLSv1TLSv1.1TLSv1.2TLSv1.3)ABCabstractmethod)deque)AnyDequeListOptionalTuple   )InterfaceErrorNotSupportedErrorOperationalErrorProgrammingErrorReadTimeoutErrorWriteTimeoutError)COMPRESSED_PACKET_HEADER_LENGTHMAX_PAYLOAD_LENGTHMIN_COMPRESS_LENGTHPACKET_HEADER_LENGTH   )StreamWriteropen_connectionerrreturnc                 p    U R                   (       d  [        U 5      $ U R                    SU R                   3$ )zXReformat the IOError error message.

This function reformats the IOError error message.
 )errnostrstrerror)r   s    S/var/www/auris/envauris/lib/python3.13/site-packages/mysql/connector/aio/network.py_strioerrorr'   I   s,    
 993s8GSYYKq*GG    c                       \ rS rSrSr\   SS\S\S\S\	\
   S\	\
   S	\	\
   S
S4S jj5       r\ SS\R                  S\S\	\
   S
\4S jj5       rSrg)NetworkBrokerQ   a  Broker class interface.

The network object is a broker used as a delegate by a socket object. Whenever the
socket wants to deliver or get packets to or from the MySQL server it needs to rely
on its network broker (netbroker).

The netbroker sends `payloads` and receives `packets`.

A packet is a bytes sequence, it has a header and body (referred to as payload).
The first `PACKET_HEADER_LENGTH` or `COMPRESSED_PACKET_HEADER_LENGTH`
(as appropriate) bytes correspond to the `header`, the remaining ones represent the
`payload`.

The maximum payload length allowed to be sent per packet to the server is
`MAX_PAYLOAD_LENGTH`. When  `send` is called with a payload whose length is greater
than `MAX_PAYLOAD_LENGTH` the netbroker breaks it down into packets, so the caller
of `send` can provide payloads of arbitrary length.

Finally, data received by the netbroker comes directly from the server, expect to
get a packet for each call to `recv`. The received packet contains a header and
payload, the latter respecting `MAX_PAYLOAD_LENGTH`.
Nwriteraddresspayloadpacket_numbercompressed_packet_numberwrite_timeoutr    c                    #    g7f)a  Send `payload` to the MySQL server.

If provided a payload whose length is greater than `MAX_PAYLOAD_LENGTH`, it is
broken down into packets.

Args:
    sock: Object holding the socket connection.
    address: Socket's location.
    payload: Packet's body to send.
    packet_number: Sequence id (packet ID) to attach to the header when sending
                   plain packets.
    compressed_packet_number: Same as `packet_number` but used when sending
                              compressed packets.
    write_timeout: Timeout in seconds before which sending a packet to the server
                   should finish else WriteTimeoutError is raised.


Raises:
    :class:`OperationalError`: If something goes wrong while sending packets to
                               the MySQL server.
N )selfr,   r-   r.   r/   r0   r1   s          r&   writeNetworkBroker.writei           readerread_timeoutc                    #    g7f)a  Get the next available packet from the MySQL server.

Args:
    sock: Object holding the socket connection.
    address: Socket's location.
    read_timeout: Timeout in seconds before which reading a packet from the server
                  should finish.

Returns:
    packet: A packet from the MySQL server.

Raises:
    :class:`OperationalError`: If something goes wrong while receiving packets
                               from the MySQL server.
    :class:`ReadTimeoutError`: If the time to receive a packet from the server takes
                               longer than `read_timeout`.
    :class:`InterfaceError`: If something goes wrong while receiving packets
                             from the MySQL server.
Nr3   )r4   r9   r-   r:   s       r&   readNetworkBroker.read   r7   r8   r3   NNNN)__name__
__module____qualname____firstlineno____doc__r
   r   r$   bytesr   intr5   asyncioStreamReader	bytearrayr<   __static_attributes__r3   r(   r&   r*   r*   Q   s    .  (,26'+  	
  } #+3-  } 
 > 
 '+	$$  sm	
 
 r(   r*   c                   6   \ rS rSrSrSS jr\S\S\\	\	4   4S j5       r
SS\\	   SS4S	 jjrS
\S\S\SS4S jr  SS\R"                  S\	S\\	   S\4S jjr   SS
\S\S\S\\	   S\\	   S\\	   SS4S jjr SS\R"                  S\S\\	   S\4S jjrSrg)NetworkBrokerPlain   ,Broker class for MySQL socket communication.r    Nc                     SU l         g N_pktnrr4   s    r&   __init__NetworkBrokerPlain.__init__   s	    r(   pktc                     [        U 5      [        :  a  [        S5      e[        R                  " SU SS S-   5      S   U S   p!X4$ )-Recover the header information from a packet.3Can't recover header info from an incomplete packet<Ir          )lenr   
ValueErrorstructunpack)rW   pllseqids      r&   
get_headerNetworkBrokerPlain.get_header   sS     s8**RSS MM$Aa7 23A6F 
 zr(   next_idc                 l    Uc  U =R                   S-  sl         OXl         U =R                   S-  sl         gz:Set the given packet id, if any, else increment packet id.Nr      rR   r4   rf   s     r&   _set_next_pktnr"NetworkBrokerPlain._set_next_pktnr   s(    ?KK1K!Ksr(   r,   r-   c                    #     UR                  U5        UR                  5       I Sh  vN   g N! [         a  n[        SU[	        U5      4S9UeSnAf[
         a  n[        SS9UeSnAff = f7f)z!Write packet to the comm channel.N  r#   valuesi  r#   )r5   drainIOErrorr   r'   AttributeError)r4   r,   r-   rW   r   s        r&   
_write_pktNetworkBrokerPlain._write_pkt   sk     	8LL,,.   	"G[-=#>  	8".C7	8s<   A/$0 .0 A/0 
A,AA,
A''A,,A/r9   sizer:   c                 r  #     [        S5      n[        U5      U:  a_  [        R                  " UR	                  U[        U5      -
  5      U5      I Sh  vN nU(       d	  [        SS9eXE-  n[        U5      U:  a  M_  U$  N+! [        R                  [        R                  4 a  n[        SS9UeSnAff = f7f)z(Read `size` bytes from the comm channel.r(   Ni  rq     )	rI   r^   rG   wait_forr<   r   CancelledErrorTimeoutErrorr   )r4   r9   rw   r:   rW   chunkr   s          r&   _read_chunkNetworkBrokerPlain._read_chunk   s     	8C.Cc(T/%..KKs3x0,  (t44 c(T/ J &&(<(<= 	8".C7	8sA   B7AB A?'B =B >B7?B $B4%
B//B44B7r.   r/   r0   r1   c                   #    U R                  U5        Sn [        [        U5      [        -  5       Hz  n[        R
                  " U R                  UUS[        R                  " SU R                  5      -   X7U[        -    -   5      U5      I Sh  vN   U R                  5         U[        -  nM|     [        R
                  " U R                  UU[        R                  " S[        U5      U-
  5      SS [        R                  " SU R                  5      -   X7S -   5      U5      I Sh  vN   g N N! [        R                  [        R                  4 a  n	[        SS9U	eSn	A	ff = f7f)	zSend payload to the MySQL server.

If provided a payload whose length is greater than `MAX_PAYLOAD_LENGTH`, it is
broken down into packets.
r      <BNr[   r\   ry   rq   )rk   ranger^   r   rG   rz   ru   r`   packrS   r{   r|   r   )
r4   r,   r-   r.   r/   r0   r1   offset_r   s
             r&   r5   NetworkBrokerPlain.write   s\     	]+ 	93w<+==>&&OO# ++dDKK89!64F+FGH "	 	 	 $$&,, ? ""KKc'lV&;<QqAkk$45g&' 	 	 			 &&(<(<= 	9#$/S8	9sN   E&A7D0 D,BD0 &D.'D0 +E&,D0 .D0 0$E#
EE##E&c                 
  #     U R                  U[        U5      I Sh  vN nU R                  U5      u  oPl        X@R                  XU5      I Sh  vN -   $  N8 N! [         a  n[        SU[        U5      4S9UeSnAff = f7f)z+Receive `one` packet from the MySQL server.Nrn   ro   )r~   r   rd   rS   rs   r   r'   )r4   r9   r-   r:   headerpayload_lenr   s          r&   r<   NetworkBrokerPlain.read  s     	++F4H,WWF (,v'>$K "2"26"UUUU X V 	"G[-=#>	sJ   BA A1A AA BA A 
B %A;;B  BrR   r    Nr?   )r   Nr>   )r@   rA   rB   rC   rD   rU   staticmethodrE   r   rF   rd   r   rk   r   r$   ru   rG   rH   rI   r~   r5   r<   rJ   r3   r(   r&   rL   rL      sS   6 
 
%S/ 
 
x}  88 8 	8
 
8( &*	8$$8 8 sm	8
 
82 (,26'+-9-9 -9 	-9
  }-9 #+3--9  }-9 
-9f '+	$$  sm	
 
 r(   rL   c                     ^  \ rS rSrSrSU 4S jjr\S\S\S\	\   4S j5       r
\S	\S\\\\4   4S
 j5       rSS\\   SS4S jjrS\S\S	\SS4U 4S jjr   SS\S\S\S\\   S\\   S\\   SS4U 4S jjjr SS\R(                  S\S\\   SS4U 4S jjjr SS\R(                  S\S\\   S\4U 4S jjjrSrU =r$ )NetworkBrokerCompressedi*  rN   r    Nc                 N   > [         TU ]  5         SU l        [        5       U l        g rP   )superrU   _compressed_pktnrr   _queue_read)r4   	__class__s    r&   rU    NetworkBrokerCompressed.__init__-  s     !#-2Wr(   r.   pktnrc                    Sn/ n[        [        U 5      [        -  5       HI  nUR                  S[        R
                  " SU5      -   XU[        -    -   5        US-   S-  nU[        -  nMK     UR                  [        R
                  " S[        U 5      U-
  5      SS [        R
                  " SU5      -   XS -   5        U$ )	z2Prepare a payload for sending to the MySQL server.r   r   r   r   ri   r[   r\   N)r   r^   r   appendr`   r   )r.   r   r   pktsr   s        r&   _prepare_packets(NetworkBrokerCompressed._prepare_packets2  s     
 s7|'99:AKK++dE*+6,>#>?@
 QY#%E((F ; 	KKc'lV34Qq9kk$&'g	

 r(   rW   c                     [        U 5      [        :  a  [        S5      e[        R                  " SU SS S-   5      S   U S   [        R                  " SU SS S-   5      S   p2nXU4$ )rY   rZ   r[   r   r\   r]         )r^   r   r_   r`   ra   )rW   compressed_pllrc   uncompressed_plls       r&   rd   "NetworkBrokerCompressed.get_headerK  sw     s855RSS MM$Aa7 23A6FMM$Aa7 23A6  0 &666r(   rf   c                 l    Uc  U =R                   S-  sl         OXl         U =R                   S-  sl         grh   )r   rj   s     r&   _set_next_compressed_pktnr2NetworkBrokerCompressed._set_next_compressed_pktnrY  s/    ?""a'"%,"#%r(   r,   r-   c                 D  >#    [         R                  " U5      n[        R                  " S[	        U5      5      SS [        R                  " SU R
                  5      -   [        R                  " S[	        U5      5      SS -   U-   n[        TU ]  XU5      I Sh  vN $  N7f)z1Compress packet and write it to the comm channel.r[   r   r\   r   N)zlibcompressr`   r   r^   r   r   ru   )r4   r,   r-   rW   compressed_pktr   s        r&   ru   "NetworkBrokerCompressed._write_pkta  s      s+KKc.121Q7kk$ 6 678kk$C)!A./  	 W'====s   BB BB r/   r0   r1   c                 `  >#    U R                  U5        U R                  U5         [        S5      R                  U R	                  X0R
                  5      5      n[        U5      [        [        -
  :  a  Sn[        [        U5      [        -  5       HU  n	[        R                  " U R                  UUXxU[        -    5      U5      I Sh  vN   U R                  5         U[        -  nMW     [        R                  " U R                  XXxS 5      U5      I Sh  vN   g[        U5      [        :  a0  [        R                  " U R                  XU5      U5      I Sh  vN   g[        R                  " [        TU ]1  UU[        R                   " S[        U5      5      SS [        R                   " SU R"                  5      -   [        R                   " SS5      SS -   U-   5      U5      I Sh  vN   g GN' N N N! [        R$                  [        R&                  4 a  n
[)        SS9U
eSn
A
ff = f7f)	zSend `payload` as compressed packets to the MySQL server.

If provided a payload whose length is greater than `MAX_PAYLOAD_LENGTH`, it is
broken down into packets.
r(   r   Nr[   r\   r   ry   rq   )rk   r   rI   joinr   rS   r^   r   r   r   rG   rz   ru   r   r   r`   r   r   r{   r|   r   )r4   r,   r-   r.   r/   r0   r1   payload_prepr   r   r   r   s              r&   r5   NetworkBrokerCompressed.writeq  s     	]+''(@A6	9$S>..%%g{{;L 7|14HHH  s<04FFGA!**"#(&;M2MN
 &   33500F H &&OOF\'5JK!   w<"55!**F  
 "***"#"KKc,.?@1E$kk$0F0FGH$kk$21Q78 ++ &
 
 
5

 &&(<(<= 	9#$/S8	9s   #H.B!G8 G/	AG8 G2G8 H.=G8 G4G8 H.B
G8 )G6*G8 .H./G8 2G8 4G8 6G8 8$H+
H&&H++H.r9   r   r:   c           	        >#    [        [        R                  " [        T
U ]  XU5      I Sh  vN 5      5      nSnU[        U5      :  a  [        R                  " SXEU[        -   S-
   S-   5      S   n[        U-   [        U5      U-
  :  ap  [        T
U ]  U[        U5      I Sh  vN nU R                  U5      u  nU l        n[        T
U ]  XU5      I Sh  vN n	UUS:X  a  U	O[        R                  " U	5      -  nU R                  R                  XEU[        -   U-    5        U[        U-   -  nU[        U5      :  a  M  gg GN N Np7f)z&Handle reading of a compressed packet.Nr   r[   r   r]   )rI   r   
decompressr   r~   r^   r`   ra   r   r   rd   r   r   r   )r4   r9   r   r:   rW   r   rb   r   r   r   r   s             r&   _read_compressed_pkt,NetworkBrokerCompressed._read_compressed_pkt  s[     OOg)&,OO

 s3x--c6,@#@1#DEOC $c)CHv,==  %w2;\   OOF+	"*$',w':L( " '1, #8 ##C:N1NQT1T$UV*S00F? s3x	 P"s;   )E	EA7E	$E%1E	EA'E	 E	E	E	c                   >#    U R                   (       d   [        T	U ]	  U[        U5      I Sh  vN nU R	                  U5      u  nU l        nUS:X  a2  U R                   R                  [        T	U ]	  XU5      I Sh  vN 5        OU R                  XU5      I Sh  vN    U R                   (       d  gU R                   R                  5       nUS   U l        U$  N N^ NA! [         a  n[        SU[        U5      4S9UeSnAff = f7f)zkReceive `one` or `several` packets from the MySQL server, enqueue them, and
return the packet at the head.
Nr   rn   ro   r\   )r   r   r~   r   rd   r   r   r   rs   r   r'   popleftrS   )
r4   r9   r-   r:   r   r   r   r   rW   r   s
            r&   r<   NetworkBrokerCompressed.read  s     $w2;\   OOF+	"*$ $q($$++#g1&,WW
 33   &&(!f
A X  &S1A'Bsi   DC CAC ;C<C DC CC 9DC C C 
D(C>>DD)r   rS   r   r   r?   r>   )r@   rA   rB   rC   rD   rU   r   rE   rF   r   r   r   rd   r   r   r   r$   ru   r5   rG   rH   r   rI   r<   rJ   __classcell__r   s   @r&   r   r   *  s   65
 %  U  0 7 7%S#"6 7 7&(3- &4 &>> > 	>
 
>* (,26'+G9G9 G9 	G9
  }G9 #+3-G9  }G9 
G9 G9Z '+	-1$$-1 -1 sm	-1
 
-1 -1f '+	-$$- - sm	-
 
- -r(   r   c                      \ rS rSrSrS!S jr\S\4S j5       r\	S\
SS4S j5       rS!S	 jrS\4S
 jrS\SS4S jrS!S jrS\R&                  SS4S jr   S"S\S\\   S\\   S\\   SS4
S jjrS#S\\   S\4S jjrSSSSS/ / 4S\\   S\\   S\\   S\\   S\\   S\\\      S\\\      S\R&                  4S jjrS rg)$MySQLSocketi  zuMySQL socket communication interface.

Examples:
    Subclasses: network.MySQLTCPSocket and network.MySQLUnixSocket.
r    Nc                 h    SU l         SU l        SU l        SU l        [	        5       U l        SU l        g)zcNetwork layer where transactions are made with plain (uncompressed) packets
is enabled by default.
NF)_reader_writer_connection_timeout_addressrL   
_netbroker_is_connectedrT   s    r&   rU   MySQLSocket.__init__   s3     8</326 '+);)=#(r(   c                     U R                   $ )zSocket location.)r   rT   s    r&   r-   MySQLSocket.address+  s     }}r(   kwargsc                    #    g7f)zOpen the socket.Nr3   r4   r   s     r&   r   MySQLSocket.open_connection0  r7   r8   c                 ^  #    U R                   (       ax   U R                   R                  5         U R                   R                  b$  U R                   R                  R                  5         U R                   R	                  5       I Sh  vN   SU l        g N! [
         a
  n SnANSnAff = f7f)zClose the connection.NF)r   close	transportabortwait_closed	Exceptionr   )r4   r   s     r&   close_connectionMySQLSocket.close_connection4  s     <<	""$<<))5LL**002ll..000
 # 1  s;   B-A2B BB B-B 
B* B-%B**B-c                     U R                   $ )zpCheck if the socket is connected.

Return:
    bool: Returns `True` if the socket is connected to MySQL server.
)r   rT   s    r&   is_connectedMySQLSocket.is_connectedC  s     !!!r(   timeoutc                     Xl         g)zSet the connection timeout.N)r   )r4   r   s     r&   set_connection_timeout"MySQLSocket.set_connection_timeoutK  s    #* r(   c                 "    [        5       U l        g)zIEnable network layer where transactions are made with compressed packets.N)r   r   rT   s    r&   switch_to_compressed_mode%MySQLSocket.switch_to_compressed_modeO  s    13r(   ssl_contextc                    #    U R                   c   eU R                   R                  R                  S5      nUR                  S:X  a  [	        S5      eU R                   R                  U5      I Sh  vN   g N7f)a  Upgrade an existing stream-based connection to TLS.

The `start_tls()` method from `asyncio.streams.StreamWriter` is only available
in Python 3.11. This method is used as a workaround.

The MySQL TLS negotiation happens in the middle of the TCP connection.
Therefore, passing a socket to open connection will cause it to negotiate
TLS on an existing connection.

Args:
    ssl_context: The SSL Context to be used.

Raises:
    RuntimeError: If the transport does not expose the socket instance.
Nsocketr   z,SSL is not supported when using Unix sockets)r   r   get_extra_infofamilyr   	start_tls)r4   r   r   s      r&   switch_to_sslMySQLSocket.switch_to_sslS  sa     " ||'''''66x@==A"#QRRll$$[111s   A.A80A61A8r.   r/   r0   r1   c           	         #    U R                   R                  U R                  U R                  UUUUS9I Sh  vN   g N7f)z!Send packets to the MySQL server.)r/   r0   r1   N)r   r5   r   r-   )r4   r.   r/   r0   r1   s        r&   r5   MySQLSocket.writel  sB      oo##LLLL'%=' $ 
 	
 	
s   6A >A r:   c                    #    U R                   R                  U R                  U R                  U5      I Sh  vN $  N7f)z#Read packets from the MySQL server.N)r   r<   r   r-   )r4   r:   s     r&   r<   MySQLSocket.read}  s,     __))$,,lSSSSs   5><>Fssl_cassl_certssl_keyssl_verify_certssl_verify_identitytls_versionstls_cipher_suitesc                    SnU R                   (       d	  [        SS9e[        c  [        S5      e U(       a  UR	                  SS9  US   n[
        U   n	[        R                  " U	5      n
US:X  a{  S	U;  a#  U
=R                  [        R                  -  sl        S
U;  a#  U
=R                  [        R                  -  sl        SU;  a#  U
=R                  [        R                  -  sl        O[        R                  " 5       n
XZl        U(       a  [        R                  U
l        O2U(       a  [        R                  U
l        O[        R                   U
l        U
R#                  5         U(       a   U
R%                  U5        U(       a   U
R+                  X#5        U(       a&  US	:X  a   U
R-                  SR/                  U5      5        U
$ ! [&        [        R(                  4 a  n[        SU 35      UeSnAff = f! [&        [        R(                  4 a  n[        SU 35      UeSnAff = f! [0         a  n[3        S5      UeSnAf[&        [4        [        R6                  [        R(                  4 a  n[        [9        U5      5      UeSnAff = f)zBuild a SSLContext.Ni   rq   z&Python installation has no SSL supportT)reverser   r   r   r   r   zInvalid CA Certificate: zInvalid Certificate/Key: :)r   r   sslRuntimeErrorsortTLS_VERSIONS
SSLContextoptionsOP_NO_TLSv1_2OP_NO_TLSv1_1OP_NO_TLSv1create_default_contextcheck_hostnameCERT_REQUIREDverify_modeCERT_OPTIONAL	CERT_NONEload_default_certsload_verify_locationsrs   SSLErrorload_cert_chainset_ciphersr   	NameErrorr   NotImplementedErrorCertificateErrorr$   )r4   r   r   r   r   r   r   r   tls_versionssl_protocolcontextr   s               r&   build_ssl_contextMySQLSocket.build_ssl_context  s"    &*|| t,,;GHH5	4!!$!/*1o+K8..6)+ 43+<+<< 43+<+<<l23??:446%8"&)&7&7#$&)&7&7#&)mm#&&(T11&9 U++H> ![I%=##CHH->$?@N  . T(+CC5)IJPSST
  . U(+DSE)JKQTTU  	W#$LMSVV  LL	
 	4 !S*3	4sl   D=H) .G ?H) G8 .H) G5!G00G55H) 8H&H!!H&&H) )
J
3H??1J
0JJ
)r   r   r   r   r   r   r   r>   r?   )r@   rA   rB   rC   rD   rU   propertyr$   r-   r
   r   r   r   boolr   rF   r   r   r   r   r   rE   r   r5   rI   r<   r   r	  rJ   r3   r(   r&   r   r     s   	)    c d  #"d "+c +d +42s~~ 2$ 28 (,26'+

  }
 #+3-	

  }
 

"Tx} T	 T !%"&!%*/.3,.13H4H4 3-H4 #	H4
 "$H4 &d^H4 tCy)H4 $DI.H4 
H4 H4r(   r   c                   T   ^  \ rS rSrSr SS\S\S\4U 4S jjjrS\	SS	4S
 jr
SrU =r$ )r   i  z{MySQL socket class using TCP/IP.

Args:
    host: MySQL host name.
    port: MySQL port.
    force_ipv6: Force IPv6 usage.
hostport
force_ipv6c                 ^   > [         TU ]  5         Xl        X l        X0l        U SU 3U l        g )Nr   )r   rU   _host_port_force_ipv6r   )r4   r  r  r  r   s       r&   rU   MySQLTcpSocket.__init__  s2     	

!+ $vQtf-r(   r   r    Nc                    #    [        SU R                  U R                  S.UD6I Sh  vN u  U l        U l        SU l        g N7f)zOpen TCP/IP connection.)r  r  NTr3   )r   r  r  r   r   r   r   s     r&   r   MySQLTcpSocket.open_connection  sF     +: ,
$**,
06,
 &
"dl "&
   &AAA)r   r  r  r   r  r   r   )z	127.0.0.1i  F)r@   rA   rB   rC   rD   r$   rF   r  rU   r   r   rJ   r   r   s   @r&   r   r     sI     MR..-0.EI. ."c "d " "r(   c                   J   ^  \ rS rSrSrS
S\4U 4S jjjrS\SS4S jrS	r	U =r
$ )r   i  zVMySQL socket class using UNIX sockets.

Args:
    unix_socket: UNIX socket file path.
unix_socketc                 .   > [         TU ]  5         Xl        g r?   )r   rU   r   )r4   r  r   s     r&   rU   MySQLUnixSocket.__init__  s    (r(   r   r    Nc                    #    [         R                  " SSU R                  0UD6I Sh  vN u  U l        U l        SU l        g N7f)zOpen UNIX socket connection.pathNTr3   )rG   open_unix_connectionr   r   r   r   r   s     r&   r   MySQLUnixSocket.open_connection  sL     
 .. 

"(
 
	
LL "
r  )r   r   r   r   )z/tmp/mysql.sock)r@   rA   rB   rC   rD   r$   rU   r   r   rJ   r   r   s   @r&   r   r     s1    )C ) )"c "d " "r(   )/rD   __all__rG   r`   r   r   PROTOCOL_TLSv1PROTOCOL_TLSv1_1PROTOCOL_TLSv1_2PROTOCOL_TLSr   ImportErrorabcr	   r
   collectionsr   typingr   r   r   r   r   errorsr   r   r   r   r   r   networkr   r   r   r   utilsr   r   rs   r$   r'   r*   rL   r   r   r   r   r3   r(   r&   <module>r-     s   > M .
/   
 ##''''##	L $  4 4   1HW H HQC QhB BJl0 l^p4# p4f"[ "4"k "k  
Cs   3C CC