
    G)f6                       d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZ dd	lmZ dd
lm Z m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZA ddlBmBZB ddlCmDZDmEZEmFZF ddlGmHZH ddlImJZJ ddlKmLZL ddlMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZV ddlWmXZXmYZYmZZZm[Z[ erddlm\Z\ eHrddl]m^Z^m_Z_  G d de      Z`y)z.Implementing communication with MySQL servers.    )annotationsN)Decimal)IOBase)TYPE_CHECKINGAnyBinaryIODict	GeneratorListMappingOptionalSequenceTupleTypeUnion   )version)MySQLConnectionAbstract)MySQLAuthenticatorget_auth_plugin)
ClientFlag	FieldTypeRefreshOption	ServerCmd
ServerFlagflag_is_set)MySQLConverter)
CursorBaseMySQLCursorMySQLCursorBufferedMySQLCursorBufferedDictMySQLCursorBufferedNamedTupleMySQLCursorBufferedRawMySQLCursorDictMySQLCursorNamedTupleMySQLCursorPreparedMySQLCursorPreparedDictMySQLCursorPreparedNamedTupleMySQLCursorPreparedRawMySQLCursorRaw)DatabaseErrorErrorInterfaceErrorInternalErrorNotSupportedErrorOperationalErrorProgrammingErrorget_exception)logger)MySQLSocketMySQLTCPSocketMySQLUnixSocket)OTEL_ENABLED)with_context_propagation)MySQLProtocol)	BinaryProtocolTypeDescriptionTypeEofPacketTypeHandShakeTypeOkPacketType
ResultTypeRowTypeStatsPacketType
StrOrBytes)get_platform	int1store	int4storelc_int)CMySQLPrepStmt)end_spanrecord_exception_eventc                      e Zd ZdZd6 fdZd7dZd7dZ	 	 	 	 	 	 	 d8	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d9dZd:dZd7dZ	d7dZ
d7d	ZeZ	 	 	 	 	 d;	 	 	 	 	 	 	 	 	 	 	 	 	 d<d
Z	 d=	 	 	 	 	 d>dZd?dZed@d       ZdAdZdBdZdCdZdDdZ	 	 	 	 dE	 	 	 	 	 	 	 	 	 dFdZ	 	 	 	 	 dG	 	 	 	 	 	 	 	 	 	 	 dHdZd7dZdIdZe	 	 	 dJ	 	 	 	 	 	 	 	 	 dKd       Z	 	 	 	 dLdZdMdZdNdZdOdPdZdQdZ dRdZ!dSdZ"dTdZ#	 	 	 	 	 	 	 	 	 dU	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dVdZ$edWd        Z%e%jL                  dXd!       Z%d@d"Z'dYd#Z(	 	 dZ	 	 	 	 	 d[d$Z)d\d]d%Z*ed^d&       Z+	 	 	 	 	 	 d_	 	 	 	 	 	 	 	 	 	 	 	 	 d`d'Z,d7d(Z-d7d)Z.dad*Z/dbd+Z0dcd,Z1	 	 	 	 ddd-Z2dedfd.Z3	 	 	 	 dgd/Z4e	 	 	 dh	 	 	 	 	 	 	 	 	 did0       Z5djd1Z6	 	 	 	 	 	 	 	 dkd2Z7djd3Z8d@d4Z9d7d5Z: xZ;S )lMySQLConnectionzConnection to a MySQL Serverc                   d | _         d | _        d | _        t        |           t
        | _        t        j                         | _	        d| _
        d | _        d | _        d| _        d| _        d| _        d| _        d| _        d| _        d | _        d| _        d| _        i | _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d | _         d| _!        d | _"        d | _#        d | _$        d| _%        g | _&        d| _'        tQ               | _)        |r	  | jT                  d	i | y y # tV        $ r | jY                          d | _         w xY w)
N-   F z	127.0.0.1i  r   Tr    )-	_protocol_socket
_handshakesuper__init__r   _converter_classr   get_default_client_flags_charset_id	_sql_mode
_time_zone_autocommit_user	_password	_database_host_port_unix_socket_client_host_client_port_ssl_force_ipv6_use_unicode_get_warnings_raise_on_warnings	_buffered_unread_result_have_next_result_raw_in_transaction_prepared_statements_ssl_active_auth_plugin_krb_service_principal_pool_config_version_query_attrs_supported_columns_desc_mfa_nfactorr   _authenticatorconnect	Exceptionclose)selfkwargs	__class__s     W/var/www/html/flask-app/venv/lib/python3.12/site-packages/mysql/connector/connection.pyrT   zMySQLConnection.__init__|   so   26.2376D","8"8": "(,)-!&
  %

+/!#!"FH	!&"&#((-$$)',	%*)-!!&+/59#)-!+0#46!"2D2F&v&   

#	s   -E "E#c                   t               }t        j                  j                  d      }|d   dk(  rd}nd}t	        t        j                               |d   t        j                         d|dj                  t        j                  dd	 D cg c]  }t	        |       c}      |d
   d}| j                  j                  |       yc c}w )z&Add the default connection attributes. r   GPLv2zGPL-2.0
Commercialarchzmysql-connector-python.   r   )_pid	_platform_source_host_client_name_client_license_client_version_osN)rC   r   LICENSEsplitstrosgetpidsocketgethostnamejoinVERSION_conn_attrsupdate)rz   platformlicense_chunksclient_licensexdefault_conn_attrss         r}   _add_default_conn_attrsz'MySQLConnection._add_default_conn_attrs   s    > ..s3!'&N)N		$!&)"..04-"xx19M(NAQ(NOI&
 	!35	 )Os   Cc                >   t        | j                  j                               }|d   dk(  rt        |      d| _        | j
                  j                  |      }|d   }| j                  t        |t        t         t        f      r|nd      | _        | j                  j                  | j                         |d   t        j                  z  ss| j                   dk(  r| j"                  st%        d      | j&                  j)                  d	      rt%        d
d      | xj*                  t        j                   z  c_        n/| j,                  s#| xj*                  t        j                  z  c_        |d   t        j.                  z  r | j1                  t        j.                  g       |d   t        j2                  z  r'd| _        | j1                  t        j2                  g       |d   t        j6                  z  r | j1                  t        j6                  g       || _        y)z'Get the handshake from the MySQL server      Nserver_version_originalUnknowncapabilitiesmysql_clear_passwordzEClear password authentication is not supported over insecure channelsverify_certz1SSL is required but the server doesn't support iti  )errnoT)bytesrQ   recvr2   rR   rP   parse_handshake_check_server_version
isinstancer   	bytearray_server_version_character_setset_mysql_versionr   SSLrp   	is_securer-   rd   getrW   _ssl_disabledPLUGIN_AUTHset_client_flagsCLIENT_QUERY_ATTRIBUTESrs   MULTI_FACTOR_AUTHENTICATION)rz   packet	handshakeserver_versions       r}   _do_handshakezMySQLConnection._do_handshake   s   t||((*+!9''NN226:	"#<=#99.3y*AB  

 	--d.B.BC(:>>9  $::4>>$(  yy}}]+$G  :>>/1##*..0^$z'='==!!:#9#9":;^$z'I'II*.D'!!:#E#E"FG^$z'M'MM!!:#I#I"JK#    c                   | j                   j                  d      s.| j                   j                  d      rJt        j                  dk(  r7|s5t	        j
                         }t        j                  d|| j                          | j                  r|| j                  k7  r| j                  }d| _	        | j                  sN|t        j                  z  r;| j                  j                  | j                  | j                   |||       d| _	        | j                  j#                  | j                  | j$                  ||| j&                  | j(                  |||| j                   | j*                  || j,                  | j.                  | j0                  | j2                  | j4                        }| j7                  |       |t        j8                  z  s|r| j;                  |       y)	ae  Authenticate with the MySQL server

        Authentication happens in two parts. We first send a response to the
        handshake. The MySQL server will then send either an AuthSwitchRequest
        or an error packet.

        Raises NotSupportedError when we get the old, insecure password
        reply back. Raises any error coming from MySQL.
        authentication_ociauthentication_kerberosntz4MySQL user is empty, OS user: %s will be used for %sF)charsetclient_flagsT)sockr   username	password1	password2	password3databaser   r   auth_pluginauth_plugin_class
conn_attrskrb_service_principaloci_config_fileoci_config_profilewebauthn_callbackfido_callback)rp   
startswithr   namegetpassgetuserr3   debug
_password1ro   r   r   r   rv   	setup_sslrQ   server_hostauthenticaterR   
_password2
_password3_auth_plugin_classrq   _oci_config_file_oci_config_profile_webauthn_callback_fido_callback
_handle_okCONNECT_WITH_DBcmd_init_db)	rz   r   passwordr   r   r   ssl_optionsr   ok_pkts	            r}   _do_authzMySQLConnection._do_auth   s   ( (()=>!!,,-FGGGtO(HLLF!! ??x4??:H !!|jnn'D))  ) *   $D$$11oooooo%))"55!"&"="= 11#77"55--# 2 
& 	z999xX&r   c                   d}| j                   r*t        j                  dk(  rt        | j                        }n,t        | j                  | j                  | j                        }|j                  | j                         |S )zGet connection based on configuration

        This method will return the appropriated connection object using
        the connection parameters.

        Returns subclass of MySQLBaseSocket.
        Nposix)unix_socket)hostport
force_ipv6)ra   r   r   r6   r   r5   r   server_portre   set_connection_timeout_connection_timeout)rz   conns     r}   _get_connectionzMySQLConnection._get_connection>  sm     G!3"t/?/?@D!%%%%++D 	##D$<$<=r   c           	     h   | j                   dk(  rA| j                  s5t        | j                   | j                        }|j	                         | _        t               | _        | j                         | _        	 | j                  j                          | j                          | j                  | j                  | j                  | j                  | j                  | j                  | j                   | j"                         | j%                  | j&                         | j                  t(        j*                  z  r| j                  j-                          | j                  j/                  d       | j4                  st7        | j                  j8                  d      rtt;        | j                  j8                  j<                        rJ| j                  j8                  j=                         }|dv r!d| d}t?        j@                  |tB               yyyyy# t0        $ r | j                  j3                           w xY w)zOpen the connection to the MySQL server

        This method sets up and opens the connection to the MySQL server.

        Raises on errors.
        authentication_kerberos_clientNr   )TLSv1zTLSv1.1zThis connection is using zZ which is now deprecated and will be removed in a future release of MySQL Connector/Python)"rp   r\   r   r   get_user_from_credentialsr9   rP   r   rQ   open_connectionr   r   r]   r^   rW   rX   rd   r   set_converter_classrU   r   COMPRESSswitch_to_compressed_moder   rx   close_connectionr   hasattrr   callabler   warningswarnDeprecationWarning)rz   clstls_versionwarn_msgs       r}   _open_connectionz MySQLConnection._open_connectionS  s     @@!$"3"3T5L5LMC668DJ&++-	LL((*   MM

""  		   $$T%:%:;!!J$7$77668LL//5 ""))95**223 ,,++335K22/} =- - 
 h(:; 3	 4 6 #  	LL))+	s   6C4H %H1c                ~    | j                   sy	 | j                   j                          y# t        t        f$ r Y yw xY w)ah  Shut down connection to MySQL Server.

        This method closes the socket. It raises no exceptions.

        Unlike `disconnect()`, `shutdown()` closes the client connection without
        attempting to send a QUIT command to the server first. Thus, it will not
        block if the connection is disrupted for some reason such as network failure.
        N)rQ   shutdownAttributeErrorr,   rz   s    r}   r  zMySQLConnection.shutdown  s:     ||	LL!!#& 		s   * <<c                6   | j                   rE| j                   j                         r+t        | j                   t        j                         d          | j
                  sy	 | j                          	 | j
                  j                          	 t        rt        | j                          d| _        yd| _        y# t        t        f$ r Y Xw xY w# t        $ r"}t        rt        | j                   |        d}~ww xY w# t        rt        | j                          w w xY w)z Disconnect from the MySQL serverr   N)_spanis_recordingrI   sysexc_inforQ   cmd_quitr  r,   r   rx   r7   rH   rR   )rz   errs     r}   ry   zMySQLConnection.close  s    ::$**113"4::s||~a/@A||	MMO	%LL))+ $$ & 		
  	&tzz37	
 $ s6    B7 1C 7C	C		C7C22C77C: :Dc                   | j                          	 | j                  j                  | j                  j	                  ||xs |      ||       |r| j                  j                         S dS # t
        $ r}t        d      |d}~ww xY w)a4  Send a command to the MySQL server

        This method sends a command with an optional argument.
        If packet is not None, it will be sent and the argument will be
        ignored.

        The packet_number is optional and should usually not be used.

        Some commands might not result in the MySQL server returning
        a response. If a command does not return anything, you should
        set expect_response to False. The _send_cmd method will then
        return None instead of a MySQL packet.

        Returns a MySQL packet or None.
        MySQL Connection not availableN)handle_unread_resultrQ   sendrP   make_commandr  r0   r   )rz   commandargumentpacket_numberr   expect_responsecompressed_packet_numberr  s           r}   	_send_cmdzMySQLConnection._send_cmd  s    0 	!!#	NLL++GV5GxH( '6t||  "?4?  	N"#CD#M	Ns   ;A+ +	B4B  Bc                   | j                          t        |d      st        d      d}	 |j                  |dz
        }|r2| j                  j                  |       |j                  |dz
        }|r2|r	 | j                  j                  d       | j                  j                         S # t        $ r}t        d      |d}~ww xY w# t        $ r}t        d      |d}~ww xY w)a4  Send data to the MySQL server

        This method accepts a file-like object and sends its data
        as is to the MySQL server. If the send_empty_packet is
        True, it will send an extra empty package (for example
        when using LOAD LOCAL DATA INFILE).

        Returns a MySQL packet.
        readzexpecting a file-like object      r  Nr   )	r  r   
ValueErrorr  rQ   r  r  r0   r   )rz   	data_filesend_empty_packet
chunk_sizebufr  s         r}   
_send_datazMySQLConnection._send_data  s     	!!#y&);<<
	N..b1C!!#&nnZ"_5  R!!#& ||  ""  	N"#CD#M	N " R&'GHcQRs0   AB+ 6C +	C4C  C	C"CC"c                    t        t        j                  |      | _        t        t        j                  |      | _        y)a  Handle the server flags found in MySQL packets

        This method handles the server flags send by MySQL OK and EOF
        packets. It, for example, checks whether there exists more result
        sets or whether there is an ongoing transaction.
        N)r   r   MORE_RESULTS_EXISTSrk   STATUS_IN_TRANSrm   )rz   flagss     r}   _handle_server_statusz%MySQLConnection._handle_server_status  s.     "-Z-K-KU!S*:+E+EuMr   c                    | j                   S )z'MySQL session has started a transaction)rm   r  s    r}   in_transactionzMySQLConnection.in_transaction  s     ###r   c                    |d   dk(  r1| j                   j                  |      }| j                  |d          |S |d   dk(  rt        |      t	        d      )a  Handle a MySQL OK packet

        This method handles a MySQL OK packet. When the packet is found to
        be an Error packet, an error will be raised. If the packet is neither
        an OK or an Error packet, InterfaceError will be raised.

        Returns a dict()
        r   r   status_flagr   zExpected OK packet)rP   parse_okr(  r2   r-   )rz   r   r   s      r}   r   zMySQLConnection._handle_ok  s^     !9>^^,,V4F&&vm'<=M!9''122r   c                    |d   dk(  r1| j                   j                  |      }| j                  |d          |S |d   dk(  rt        |      t	        d      )a  Handle a MySQL EOF packet

        This method handles a MySQL EOF packet. When the packet is found to
        be an Error packet, an error will be raised. If the packet is neither
        and OK or an Error packet, InterfaceError will be raised.

        Returns a dict()
        r      r,  r   zExpected EOF packet)rP   	parse_eofr(  r2   r-   )rz   r   eofs      r}   _handle_eofzMySQLConnection._handle_eof  s_     !9..**62C&&s='9:J!9''233r   c                   t         j                  j                  |      }t         j                  j                  |      rt	        d      | j
                  s| j                  st        d      | j
                  s{| j                  rot         j                  j                  | j                        }d}	 t         j                  j                  ||g      }||k7  rd}t        |j                  ||            	 t        |d      }| j                  | j                  |d            	 |j!                          S # t        $ r-}d}t        |j                  t        |      ||            |d}~ww xY w# t"        t$        f$ r Y S w xY w# t"        $ rK 	 | j&                  j)                  d	       n# t*        $ r}t	        d
      |d}~ww xY wt        d| d      dw xY w# 	 j!                          w # t"        t$        f$ r Y w w xY wxY w)z'Handle a LOAD DATA INFILE LOCAL requestz#Use of symbolic link is not allowedKLOAD DATA LOCAL INFILE file request rejected due to restrictions on access.NzL{} while loading file `{}` and path `{}` given in allow_local_infile_in_pathzEThe file `{}` is not found in the given allow_local_infile_in_path {}rbT)r   r   r  zFile 'z' could not be read)r   pathabspathislinkr0   _allow_local_infile_allow_local_infile_in_pathr+   
commonpathr  r-   formatr   openr   r#  ry   IOError	NameErrorrQ   r  r  )rz   filename	file_nameinfile_pathc_pathr  err_msgr  s           r}   _handle_load_data_infilez(MySQLConnection._handle_load_data_infile/  s   GGOOH-	77>>)$"#HII''0P0P*  ''D,L,L''//$*J*JKKF	++[),DE $4  $GNN9k$JKK	Y-I??4??9PT?#UV!9  5  %NN3s8YD: Y'   	TR!!#&! R&'GHcQR 6)4G!HItS	T!Y' s   1!D4 5-F #E-4	E*=(E%%E*-E?>E?	GF('G(	G1F==GGG HG,+H,G>;H=G>>Hc                   |rt        |      dk  rt        d      |d   dk(  r| j                  |      S |d   dk(  r$|dd j                         }| j	                  |      S |d   dk(  r| j                  |      S |d   dk(  rt        |      | j                  j                  |      }|rt        |t              st        d	      dg|z  | _        t        d|      D ]M  }| j                  j                  | j                  j                         | j                         | j                  |<   O | j                  | j                  j                               }d
| _        | j                  |dS )a  Handle a MySQL Result

        This method handles a MySQL result, for example, after sending the
        query command. OK and EOF packets will be handled and returned. If
        the packet is an Error packet, an Error-exception will be
        raised.

        The dictionary returned of:
        - columns: column information
        - eof: the EOF-packet information

        Returns a dict()
        r   Empty responser         Nr/  r   zIllegal result setT)columnsr1  )lenr-   r   decoderE  r2  r2   rP   parse_column_countr   intrt   rangeparse_columnrQ   r   python_charsetunread_result)rz   r   r@  column_countir1  s         r}   _handle_resultzMySQLConnection._handle_result_  sh    Vq !122!9>??6**!9abz((*H00::!9##F++!9'' ~~88@:lC#@ !566 
 q,' 	A$(NN$?$?!!#T%8%8%Dq!	
 t||0023!--c::r   c                L    | j                  d|||      \  }}|r|d   |fS d|fS )aT  Get the next rows returned by the MySQL server

        This method gets one row from the result set after sending, for
        example, the query command. The result is a tuple consisting of the
        row and the EOF packet.
        If no row was available in the result set, the row data will be None.

        Returns a tuple.
        r   )countbinaryrJ  rawr   N)get_rows)rz   rX  rJ  rY  	prep_stmtrowsr1  s          r}   get_rowzMySQLConnection.get_row  s:      mm!FGQTmUsGS>!c{r   c                z   || j                   }| j                  st        d      g df}	 |r<| j                  }|dk(  rd}| j                  j                  | j                  |||      }n2| j                  j                  | j                  | j                  |      }|\  }}	|sR|sP| j                  D|rBt        | d      r6| j                  j                  }
|D cg c]  } |
|| j                         }}|	$| j                  d|	v r|	d   n|	d	          d| _        ||	fS # t        $ r}d| _        |d}~ww xY wc c}w )
a  Get all rows returned by the MySQL server

        This method gets all rows returned by the MySQL server after sending,
        for example, the query command. The result is a tuple consisting of
        a list of rows and the EOF packet.

        Returns a tuple()
        NzNo result set availableutf8mb4utf8)rW  F	converterr,  server_status)rl   rR  r.   r   rP   read_binary_resultrQ   read_text_resultr   r,   rt   r   ra  row_to_pythonr(  )rz   rW  rX  rJ  rY  r[  r\  r   r  eof_pre  rows               r}   rZ  zMySQLConnection.get_rows  sY     ;))C!! 9::=?J	,,i'$G~~88LL'5' ~~66LL$"6"6e 7  e3"".k* NN88MFJKsM#t'9'9:KDK&& E) m$?+
 "'DU{-  	!&DI	 Ls   A0D D8	D5'	D00D5c                >    | j                   r| j                          yy)zConsume resultsN)rR  rZ  r  s    r}   consume_resultszMySQLConnection.consume_results  s    MMO r   c                ~    | j                  | j                  t        j                  |j	                  d                  S )zChange the current database

        This method changes the current (default) database by sending the
        INIT_DB command. The result is a dictionary containing the OK packet
        information.

        Returns a dict()
        utf-8)r   r  r   INIT_DBencode)rz   r   s     r}   r   zMySQLConnection.cmd_init_db  s2     NN9,,hoog.FG
 	
r   c                ~   t        |t              s,t        |t              r|j                  d      }t        |      }| j                  dk7  r| j                  nd}t               }| j
                  s'| j                  rt        j                  dt               | j                  t        j                  z  rcg }g }g }	dgt        | j                        dz   dz  z  }
t        | j                  j                               D ]2  \  }}|d	   }d}|K|
|dz  xx   d	|dz  z  z  cc<   |j!                  t#        t$        j&                        t#        |      z          [t        |t(              r2| j*                  j-                  |      \  }}}|	j!                  |       n6t        |t              rI|j                  |      }|	j!                  t/        t        |            |z          t$        j0                  }nt        |t2              r8|	j!                  t/        t        |            |z          t$        j0                  }nt        |t4              rh|	j!                  t/        t        t        |      j                  |                  t        |      j                  |      z          t$        j6                  }nt        |t8              r6|	j!                  t;        j<                  d|             t$        j>                  }nt        |t@        j@                  t@        jB                  f      r0| j*                  jE                  |      \  }}|	j!                  |       n}t        |t@        jF                  t@        jH                  f      r0| j*                  jK                  |      \  }}|	j!                  |       n#tM        d|jN                  jP                   d      |j!                  t#        |      t#        |      z          |d   j                  |      }|j!                  t/        t        |            |z          5 |jS                  t/        t        | j                                     |jS                  t/        d	             |	r|jS                  djU                  |
D cg c]  }t;        j<                  d|       c}      t#        d	      z          tW        ||      D ]'  \  }}|jS                  |       |jS                  |       ) |	D ]  }|jS                  |        |jS                  |       t3        |      }	 | jY                  | j[                  t\        j^                  |            }| jf                  rti        d      |S c c}w # tL        $ r1}|j`                  dk(  rd|jb                  v rd}te        |      | d
}~ww xY w)a  Send a query to the MySQL server

        This method send the query to the MySQL server and returns the result.

        If there was a text result, a tuple will be returned consisting of
        the number of columns and a list containing information about these
        columns.

        When the query doesn't return a text result, the OK or EOF packet
        information as dictionary will be returned. In case the result was
        an error, exception Error will be raised.

        Returns a tuple()
        rk  r_  r`  <This version of the server does not support Query Attributescategoryr         r   Nz<dz&MySQL binary protocol can not handle 'z	' objectsr   Bil  zLoading local data is disabledr4  z8Use cmd_query_iter for statements with multiple queries.)5r   r   r   rm  r   rs   _query_attrsr   r   WarningrW   r   r   rK  	enumerateitemsappendrD   r   NULLrN  rP   prepare_binary_integerrF   STRINGr   r   DECIMALfloatstructpackDOUBLEdatetimedateprepare_binary_timestamp	timedeltatimeprepare_binary_timer1   r|   __name__extendr   ziprU  r  r   QUERYr   msgr+   rk   r-   )rz   queryrY  bufferedraw_as_stringr   r   namestypesvaluesnull_bitmappos
attr_tuplevaluer'  packed
field_typer   bit_typeresultr  rD  s                          r}   	cmd_queryzMySQLConnection.cmd_query  s   , %+%%W-e$E"&,,)";$,,**t/@/@MMN  
 B BBEE"$F##d&7&7"81"<!BCK#,T->->-D-D-F#G .7Z"1=+qS1W~=+LL9>>!:Yu=M!MNeS)
 ==eD	"MM&)s+!LL1EMM&U"4u"<=!*!1!1Ju-MM&U"4u"<=!*!1!1Jw/MMs3u:#4#4W#=>?e*++G45 "+!2!2Ju-MM&++dE":;!*!1!1J(9(98=='IJ ??F"MM&)(:(:HMM'JK+/>>+M+Me+T(VZMM&)*!OO445Y@  Yz2Yu5EEF!!}++G4VCI.56].7b MM&T%6%6!789 MM&)$HH{Kfkk#s3KLl# $'ue#4 (KE4MM%(MM$'( $ )EMM%() 	ef		((	)OPF !! J  7 L   	yyD %E%P1  $G,#5	s   U=5/V 	V<,V77V<c              #  ~  K   t               }t        |t               s,t        |t              r|j                  d      }t        |      }| j                  t
        j                  z  r4|j                  t        d             |j                  t        d             |j                  |       t        |      }| j                  | j                  t        j                  |             | j                  rI| j                          | j                  | j                   j#                                | j                  rHyyw)at  Send one or more statements to the MySQL server

        Similar to the cmd_query method, but instead returns a generator
        object to iterate through results. It sends the statements to the
        MySQL server and through the iterator you can get the results.

        statement = 'SELECT 1; INSERT INTO t1 VALUES (); SELECT 2'
        for result in cnx.cmd_query(statement, iterate=True):
            if 'columns' in result:
                columns = result['columns']
                rows = cnx.get_rows()
            else:
                # do something useful with INSERT result

        Returns a generator.
        r`  r   r   N)r   r   r   rm  rW   r   r   r  rF   r   rU  r  r   r  rk   r  rQ   r   )rz   
statementsr   r  s       r}   cmd_query_iterzMySQLConnection.cmd_query_iterg  s     & *i0*c*'..v6
":.J
 B BBMM&)$ MM&)$j!f!!$..%"HII $$%%'%%dll&7&7&9:: $$s   D8D=;D=c                   |t         j                  t         j                  z  t         j                  z  t         j                  z  t         j
                  z  t         j                  z  z  st        d      |t         j                  z  r| j                  d      }|t         j                  z  r| j                  d      }|t         j                  z  r| j                  d      }|t         j                  z  r| j                  d      }|t         j
                  z  r| j                  d      }|t         j                  z  r"| j                  | j                  dk  rdnd	      }S )
a|  Send the Refresh command to the MySQL server

        This method sends the Refresh command to the MySQL server. The options
        argument should be a bitwise value using constants.RefreshOption.
        Usage example:
         RefreshOption = mysql.connector.RefreshOption
         refresh = RefreshOption.LOG | RefreshOption.THREADS
         cnx.cmd_refresh(refresh)
        zInvalid command REFRESH optionzFLUSH PRIVILEGESz
FLUSH LOGSzFLUSH TABLESz,TRUNCATE TABLE performance_schema.host_cachezFLUSH STATUS)rs  r      zRESET SLAVEzRESET REPLICA)
r   GRANTLOGTABLESHOSTSTATUSREPLICAr  r  r   )rz   optionsress      r}   cmd_refreshzMySQLConnection.cmd_refresh  s2     ""#   ! ""	#
 ##$
 =>>](((..!34C]&&&...C])))..0C]'''..!OPC])))..0C]***..!%!5!5
!BC 
r   c                    | j                          | j                  j                  t        j                        }| j
                  j                  |dd       |S )a  Close the current connection with the server

        This method sends the `QUIT` command to the MySQL server, closing the
        current connection. Since there is no response from the MySQL server,
        the packet that was sent is returned.

        Returns a str()
        r   )r  rP   r  r   QUITrQ   r  rz   r   s     r}   r  zMySQLConnection.cmd_quit  sC     	!!#,,Y^^<&!Q'r   c                &    | j                  d       y)zShut down the MySQL Server

        This method sends the SHUTDOWN command to the MySQL server.
        The `shutdown_type` is not used, and it's kept for backward compatibility.
        SHUTDOWNN)r  )rz   shutdown_types     r}   cmd_shutdownzMySQLConnection.cmd_shutdown  s     	z"r   c                   | j                          | j                  j                  t        j                        }| j
                  j                  |dd       | j                  j                  | j
                  j                               S )zSend the statistics command to the MySQL Server

        This method sends the STATISTICS command to the MySQL server. The
        result is a dictionary with various statistical information.

        Returns a dict()
        r   )	r  rP   r  r   
STATISTICSrQ   r  parse_statisticsr   r  s     r}   cmd_statisticszMySQLConnection.cmd_statistics  sb     	!!#,,Y-A-AB&!Q'~~..t||/@/@/BCCr   c                `    t        |t              st        d      | j                  d|       S )zKill a MySQL process

        This method send the PROCESS_KILL command to the server along with
        the process ID. The result is a dictionary with the OK packet
        information.
        zMySQL PID must be intzKILL )r   rN  r  r  )rz   	mysql_pids     r}   cmd_process_killz MySQLConnection.cmd_process_kill  s0     )S)455~~i[122r   c                ^    | j                  | j                  t        j                              S )aF  Send the DEBUG command

        This method sends the DEBUG command to the MySQL server, which
        requires the MySQL user to have SUPER privilege. The output will go
        to the MySQL server error log and the result of this method is a
        dictionary with EOF packet information.

        Returns a dict()
        )r2  r  r   DEBUGr  s    r}   	cmd_debugzMySQLConnection.cmd_debug  s"     y ?@@r   c                ^    | j                  | j                  t        j                              S )a  Send the PING command

        This method sends the PING command to the MySQL server. It is used to
        check if the the connection is still valid. The result of this
        method is dictionary with OK packet information.

        Returns a dict()
        )r   r  r   PINGr  s    r}   cmd_pingzMySQLConnection.cmd_ping  s      t~~inn=>>r   c
                   t        |t              st        d      |dk  rt        d      d| _        || _        || _        || _        || _        || _        | j                  r|| j                  k7  r| j                  }| j                          | j                  rt        d      |r|| _        |	| _        | j                  j                  | j                   | j"                  | j                  || j                  | j                  ||| j$                  | j&                  | j(                  | j*                  d| j,                  | j                  | j                  | j.                  | j0                        }
| j$                  t2        j4                  z  s|r| j7                  |       || _        | j;                          | j=                  |
      S )zChange the current logged in user

        This method allows to change the current logged in user information.
        The result is a dictionary with OK packet information.

        Returns a dict()
        zcharset must be an integerr   z2charset should be either zero or a postive integerr   z-Change user is not supported with compressionT)r   r   r   r   r   r   r   r   r   r   r   r   is_change_user_requestr   r   r   r   r   )r   rN  r  ru   r\   r]   r   r   r   r  	_compressr/   r   r   rv   r   rQ   rR   rW   rp   r   r   rq   r   r   r   r   r   rX   _post_connectionr   )rz   r   r   r   r   r   r   r   r   r   r   s              r}   cmd_change_userzMySQLConnection.cmd_change_user  s   & '3'9::Q;QRR
!###??x4??:H!!#>>#$STT$3D!#5 $$11ooZZoooo++))"55''#'"&"="= 11#77"55--% 2 
* ""Z%?%??XX&" v&&r   c                *    | j                  d      d   S )zGet the current databasezSELECT DATABASE()r   )
info_queryr  s    r}   r   zMySQLConnection.databaseG  s     23A66r   c                &    | j                  |       y)zSet the current databaseN)r   )rz   r  s     r}   r   zMySQLConnection.databaseL  s     	r   c                D    	 | j                          y# t        $ r Y yw xY w)a2  Reports whether the connection to MySQL Server is available

        This method checks whether the connection to MySQL is available.
        It is similar to ping(), but unlike the ping()-method, either True
        or False is returned and no exception is raised.

        Returns True or False.
        FT)r  r,   r  s    r}   is_connectedzMySQLConnection.is_connectedQ  s)    	MMO   		s    	c                    || _         y)zySet the path that user can upload files.

        Args:
            path (str): Path that user can upload files.
        N)r:  )rz   r6  s     r}   set_allow_local_infile_in_pathz.MySQLConnection.set_allow_local_infile_in_path`  s     ,0(r   c                f   | j                         st        d      | j                         st	 | j                  | j                  | j
                  | j                  | j                  | j                  | j                  | j                  | j                  | j                  	       | j                         }|r/|j!                         D ]  \  }}|j#                  d| d|f        |r0|j!                         D ]  \  }}|j#                  d| d|f        yy# t        $ r | j                          Y w xY w)a  Clears the current active session

        This method resets the session state, if the MySQL server is 5.7.3
        or later active session will be reset without re-authenticating.
        For other server versions session will be reset by re-authenticating.

        It is possible to provide a sequence of variables and their values to
        be set after clearing the session. This is possible for both user
        defined variables and session variables.
        This method takes two arguments user_variables and session_variables
        which are dictionaries.

        Raises OperationalError if not connected, InternalError if there are
        unread results and InterfaceError on errors.
        zMySQL Connection not available.zSET @`z` = %szSET SESSION `N)r  r0   cmd_reset_connectionr  r\   r]   r^   rX   r   r   r   r   r   r1   	reconnectcursorrx  execute)rz   user_variablessession_variablescurkeyr  s         r}   reset_sessionzMySQLConnection.reset_sessionh  s   (   ""#DEE((*!$$JJNNNN$$OOOOOO)),,
 kkm,224 <
UfSE05(;</557 C
UmC57%BC  $ ! !s   A3D D0/D0c                    	 | j                          y# t        $ r,}|r| j                  ||       nt        d      |Y d}~yd}~ww xY w)a  Check availability of the MySQL server

        When reconnect is set to True, one or more attempts are made to try
        to reconnect to the MySQL server using the reconnect()-method.

        delay is the number of seconds to wait between each retry.

        When the connection is not available, an InterfaceError is raised. Use
        the is_connected()-method if you just want to check the connection
        without raising an error.

        Raises InterfaceError on errors.
        )attemptsdelayz$Connection to MySQL is not availableN)r  r,   r  r-   )rz   r  r  r  r  s        r}   pingzMySQLConnection.ping  sJ    	VMMO 	V>$%KLRUU ?	Vs    	A"AAc                R    | j                   r| j                   j                  d      S y)zMySQL connection IDserver_threadidN)rR   r   r  s    r}   connection_idzMySQLConnection.connection_id  s$     ????&&'899r   c                   | j                          | j                         st        d      |#t        |t              st        d       ||       S ||n| j                  }||n| j                  }d}|du r|dz  }|du r|dz  }|du r|dz  }|du r|d	z  }|du r|d
z  }t        t        t        t        t        t        t        t        t         t"        t$        t&        d}	  ||   |       S # t(        $ rM d}	t+        ddj-                  t/        d      D 
cg c]  }
|d|
z  z  dk7  s|	|
    nc c}
w c}
      z         dw xY w)a  Instantiates and returns a cursor

        By default, MySQLCursor is returned. Depending on the options
        while connecting, a buffered and/or raw cursor is instantiated
        instead. Also depending upon the cursor options, rows can be
        returned as dictionary or named tuple.

        Dictionary and namedtuple based cursors are available with buffered
        output but not raw.

        It is possible to also give a custom cursor through the
        cursor_class parameter, but it needs to be a subclass of
        mysql.connector.cursor.CursorBase.

        Raises ProgrammingError when cursor_class is not a subclass of
        CursorBase. Raises ValueError when cursor is not available.

        Returns a cursor-object
        r  Nz6Cursor class needs be to subclass of cursor.CursorBaser   Tr      r   rs  r  )r   r   r  r   r   rI  rs  	   r           )r  rY  
dictionarynamed_tuplepreparedz*Cursor not available with given criteria: z, rI  )r  r  r0   
issubclassr   r1   ri   rl   r   r    r*   r#   r$   r!   r%   r"   r&   r)   r'   r(   KeyErrorr  r   rO  )rz   r  rY  r  cursor_classr  r  cursor_typer  argsrT  s              r}   r  zMySQLConnection.cursor  sx   8 	!!#  ""#CDD#lJ7&L  !$'''38_c$))t1K$;1K1K$1Kt2K "%&$,#&'-
	&E+&-- 	OD<))eAhV+a:PTU:UT!WVVWX 	s    
C+ +)ED-%D-,Ec                &    | j                  d       y)zCommit current transactionCOMMITN)_execute_queryr  s    r}   commitzMySQLConnection.commit  s    H%r   c                ^    | j                   r| j                          | j                  d       y)zRollback current transactionROLLBACKN)rR  rZ  r  r  s    r}   rollbackzMySQLConnection.rollback  s"    MMOJ'r   c                F    | j                          | j                  |       y)a  Execute a query

        This method simply calls cmd_query() after checking for unread
        result. If there are still unread result, an InterfaceError
        is raised. Otherwise whatever cmd_query() returns is returned.

        Returns a dict()
        N)r  r  )rz   r  s     r}   r  zMySQLConnection._execute_query  s     	!!#ur   c                h    | j                  d      }|j                  |       |j                         S )z%Send a query which only returns 1 rowT)r  )r  r  fetchone)rz   r  r  s      r}   r  zMySQLConnection.info_query  s+    d+u  r   c                    |d   dk(  r| j                   j                  |      S |d   dk(  rt        |      t        d      )a>  Handle a MySQL Binary Protocol OK packet

        This method handles a MySQL Binary Protocol OK packet. When the
        packet is found to be an Error packet, an error will be raised. If
        the packet is neither an OK or an Error packet, InterfaceError
        will be raised.

        Returns a dict()
        r   r   r   zExpected Binary OK packet)rP   parse_binary_prepare_okr2   r-   r  s     r}   _handle_binary_okz!MySQLConnection._handle_binary_ok  sG     !9>>>99&AA!9''899r   c                >   |rt        |      dk  rt        d      |d   dk(  r| j                  |      S |d   dk(  r| j                  |      S |d   dk(  rt	        |      | j
                  j                  |      }|rt        |t              st        d      dg|z  }t        d|      D ]C  }| j
                  j                  | j                  j                         | j                        ||<   E | j                  | j                  j                               }|||fS )a  Handle a MySQL Result

        This method handles a MySQL result, for example, after sending the
        query command. OK and EOF packets will be handled and returned. If
        the packet is an Error packet, an Error exception will be raised.

        The tuple returned by this method consist of:
        - the number of columns in the result,
        - a list of tuples with information about the columns,
        - the EOF packet information as a dictionary.

        Returns tuple() or dict()
        r   rG  r   r/  r   zIllegal result set.N)rK  r-   r   r2  r2   rP   rM  r   rN  rO  rP  rQ   r   rQ  )rz   r   rS  rJ  rT  r1  s         r}   _handle_binary_resultz%MySQLConnection._handle_binary_result.  s     Vq !122!9>??6**!9##F++!9'' ~~88@:lC#@ !677*.,)>q,' 	A44!!#T%8%8GAJ	
 t||0023gs++r   c                    | j                   j                  ||      }d| _        | j                  t        j
                  |d       d| _        y)zFetch a MySQL statement Result Set

        This method will send the FETCH command to MySQL together with the
        given statement id and the number of rows to fetch.
        Fr  TN)rP   make_stmt_fetchrR  r  r   
STMT_FETCH)rz   statement_idr\  r   s       r}   cmd_stmt_fetchzMySQLConnection.cmd_stmt_fetchU  sB     //dC"y++VUK!r   c                   | j                  t        j                  |      }| j                  |      }g |d<   g |d<   |d   dkD  rt	        d|d         D ]R  }|d   j                  | j                  j                  | j                  j                         | j                               T | j                  | j                  j                                |d   dkD  rt	        d|d         D ]R  }|d   j                  | j                  j                  | j                  j                         | j                               T | j                  | j                  j                                |S )zPrepare a MySQL statement

        This method will send the PREPARE command to MySQL together with the
        given statement.

        Returns a dict()
        rJ  
parameters
num_paramsr   num_columns)r  r   STMT_PREPAREr  rO  ry  rP   rP  rQ   r   rQ  r2  )rz   	statementr   r  _s        r}   cmd_stmt_preparez MySQLConnection.cmd_stmt_prepare`  sG    	 6 6	B''/y!|,!#1f\23 |$++NN//))+T-@-@ T\\..01- 1$1f]34 y!((NN//))+T-@-@ T\\..01r   c           
        t        |      }i }|rWt        |      D ]I  \  }}t        ||   t              sd}	 d||   j                  v}| j                  ||||          |f||<   K | j                  s'| j                  rt        j                  dt               | j                  t        j                  z  rJ| j                  j!                  ||t#        |      ||| j$                  | j&                  | j(                        }	n?| j                  j!                  ||t#        |      ||| j$                  | j(                        }	| j+                  t,        j.                  |	      }
| j1                  |
      }|S # t
        $ r Y 7w xY w)z"Execute a prepared MySQL statementTbro  rp  )converter_str_fallback)r   )listrw  r   r   moder  cmd_stmt_send_long_datars   ru  r   r   rv  rW   r   r   rP   make_stmt_executetupler   query_attrs_converter_str_fallbackr  r   STMT_EXECUTEr  )rz   r  datar   r'  long_data_usedparam_idr  rX  execute_packetr   r  s               r}   cmd_stmt_executez MySQLConnection.cmd_stmt_execute  s}    *%
(4 9!d8nf5!F!$DN,?,?!? 00xhX06yN8,9 **t/@/@MMN  
 B BB!^^==j!  ,,	N "^^==j!'+'C'C > N 	 6 6~N++F3A * s   E44	F Fc                Z    | j                  t        j                  t        |      d       y)zDeallocate a prepared MySQL statement

        This method deallocates the prepared statement using the
        statement_id. Note that the MySQL server does not return
        anything.
        Fr  N)r  r   
STMT_CLOSErE   rz   r  s     r}   cmd_stmt_closezMySQLConnection.cmd_stmt_close  s)     	  l#! 	 	
r   c                2   d}d}	 |j                  |      }|ra| j                  j                  |||      }| j                  t        j
                  |d       |t        |      z  }|j                  |      }|ra|S # t        $ r}t        d      |d}~ww xY w)a.  Send data for a column

        This methods send data for a column (for example BLOB) for statement
        identified by statement_id. The param_id indicate which parameter
        the data belongs too.
        The data argument should be a file-like object.

        Since MySQL does not send anything back, no error is raised. When
        the MySQL server is not reachable, an OperationalError is raised.

        cmd_stmt_send_long_data should be called before cmd_stmt_execute.

        The total bytes send is returned.

        Returns int.
        r  r   F)r   r  r  N)	r  rP   prepare_stmt_send_long_datar  r   STMT_SEND_LONG_DATArK  r  r0   )	rz   r  r  r  r!  
total_sentr"  r   r  s	            r}   r  z'MySQLConnection.cmd_stmt_send_long_data  s    & 

	N))J'CCC (C 11!$)  
 c#h&
ii
+    	N"#CD#M	Ns   A3A< <	BBBc                t    | j                  | j                  t        j                  t	        |                   y)zReset data for prepared statement sent as long data

        The result is a dictionary with OK packet information.

        Returns a dict()
        N)r   r  r   
STMT_RESETrE   r  s     r}   cmd_stmt_resetzMySQLConnection.cmd_stmt_reset  s&     	y';';Y|=TUVr   c                    	 | j                  | j                  t        j                               | j	                          y# t
        t        f$ r Y yw xY w)zResets the session state without re-authenticating

        Reset command only works on MySQL server 5.7.3 or later.
        The result is True for a successful reset otherwise False.

        Returns bool
        TF)r   r  r   RESET_CONNECTIONr  r/   r0   r  s    r}   r  z$MySQLConnection.cmd_reset_connection  sI    	OODNN9+E+EFG!!#!#34 		s   >A AAc                l    | j                   r| j                          y| j                  rt        d      y)z'Check whether there is an unread resultzUnread result foundN)can_consume_resultsri  rR  r.   r  s    r}   r  z$MySQLConnection.handle_unread_result  s1    ##  " 566  r   )r{   r   returnNone)r&  r'  )NNNr   rM   NN)r   Optional[str]r   r(  r   r(  r   rN  r   rN  r   z:Optional[Dict[str, Optional[Union[str, bool, List[str]]]]]r   zOptional[Dict[str, str]]r&  bool)r&  r4   )Nr   NTr   )r  rN  r  Optional[bytes]r  rN  r   r*  r  r)  r  rN  r&  zOptional[bytearray])F)r  r   r   r)  r&  r   )r'  rN  r&  r'  )r&  r)  )r   r   r&  r>   )r   r   r&  r<   )r@  r   r&  r>   )r   r   r&  r?   )FNNN)
rX  r)  rJ  Optional[List[DescriptionType]]rY  Optional[bool]r[  Optional[CMySQLPrepStmt]r&  z1Tuple[Optional[RowType], Optional[EofPacketType]])NFNNN)rW  Optional[int]rX  r)  rJ  r+  rY  r,  r[  r-  r&  z-Tuple[List[RowType], Optional[EofPacketType]])r   r   r&  r>   )FFF)
r  rB   rY  r)  r  r)  r  r)  r&  r?   )r  rB   r&  z!Generator[ResultType, None, None])r  rN  r&  r>   )r&  r   )N)r  r.  r&  r'  )r&  rA   )r  rN  r&  r>   )r&  r<   )r&  r>   )	rN   rN   rN   rM   rN   rN   rN   rN   rN   )r   r   r   r   r   r   r   rN  r   r   r   r   r   r   r   r   r   r   r&  zOptional[OkPacketType])r&  r   )r  r   r&  r'  )r6  r   r&  r'  )NN)r  Optional[Dict[str, Any]]r  r/  r&  r'  )Fr   r   )r  r)  r  rN  r  rN  r&  r'  )r&  r.  )NNNNNN)r  r,  rY  r,  r  r,  r  zOptional[Type[MySQLCursor]]r  r,  r  r,  r&  r   )r  r   r&  r'  )r  r   r&  zOptional[RowType])r   r   r&  zDict[str, int])r   r   r&  EUnion[OkPacketType, Tuple[int, List[DescriptionType], EofPacketType]])r   )r  rN  r\  rN  r&  r'  )r  r   r&  z/Mapping[str, Union[int, List[DescriptionType]]])rO   rO   r   )
r  rN  r  zSequence[BinaryProtocolType]r   r   r'  rN  r&  r0  )r  rN  r&  r'  )r  rN  r  rN  r  r   r&  rN  )<r  
__module____qualname____doc__rT   r   r   r   r   r  r  ry   
disconnectr  r#  r(  propertyr*  r   r2  rE  rU  r]  rZ  ri  r   r8   r  r  r  r  r  r  r  r  r  r  r   setterr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r  r  __classcell__)r|   s   @r}   rK   rK   y   s   &6p6(+$^ #'"&"&RV/3GG  G  	G
 G G PG -G 
GR*6<p"2 J
 %)"& $()#@#@ "#@ 	#@
  #@ #@ #&#@ 
#@L >C #! #6: #	 #DN $ $3"4".`);Z 37".2 1 	
 , 
;.  $37".299 9 1	9
 9 ,9 
79v

  #xx x 	x
 x 
x xt(;$(;	*(;T#J#D	3
A	? !"$H'H' H' 	H'
 H' H' H' H' H'  H' 
 H'T 7 7 __   0 486:-C0-C 4-C 
	-C^V,   $("#'48%)&*K K K !	K
 2K #K $K 
KZ&(
!: %,%,	N%,N	"  	8 D  .0!11 +1 	1
 1 
O1 1f
%%+.%6>%	%NW7r   rK   )ar3  
__future__r   r  r   r   r   r  r  r   decimalr   ior   typingr   r   r   r	   r
   r   r   r   r   r   r   r   rN   r   	abstractsr   authenticationr   r   	constantsr   r   r   r   r   r   
conversionr   r  r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   errorsr+   r,   r-   r.   r/   r0   r1   r2   r3   networkr4   r5   r6   opentelemetry.constantsr7   !opentelemetry.context_propagationr8   protocolr9   r  r:   r;   r<   r=   r>   r?   r@   rA   rB   utilsrC   rD   rE   rF   rG   opentelemetry.instrumentationrH   rI   rK   rO   r   r}   <module>rG     s   > 5 "   	   
        . ?  '   	 	 	  A A 1 G #
 
 
 > =)ON7- N7r   