a
    ;@b_                     @   s   d Z dZdZdZdZdZedkrddlZdd	lm	Z	 dd
l
mZ dZed Zed Zdd Zdd Zdd Zdd Zdd Zdd Ze  dS )z
    pygments.lexers._mysql_builtins
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Self-updating data files for the MySQL lexer.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
)falsenulltrueunknown)<ZbigintbitboolZbooleanZdecdecimalZdoublefixedfloatZfloat4Zfloat8intZint1Zint2Zint3Zint4Zint8ZintegerZ	mediumintZ	middleintnumericZ	precisionrealserialZsmallintZtinyintdateZdatetimetimeZ	timestampZyearZbinaryZblobcharenumZlongZlongblobZlongtextZ
mediumblobZ
mediumtextZnationalZncharZnvarcharsettextZtinyblobZtinytextZ	varbinaryZvarcharZvarcharacterZvaryingZgeometryZgeometrycollectionZ
linestringZmultilinestringZ
multipointZmultipolygonZpointZpolygonZjson(u  absZacosZadddateZaddtimeZaes_decryptZaes_encryptZ	any_valueZasinZatanZatan2Z	benchmarkbinZbin_to_uuidZbit_andZ	bit_count
bit_lengthZbit_orZbit_xorZcan_access_columnZcan_access_databaseZcan_access_eventZcan_access_resource_groupZcan_access_routineZcan_access_tableZcan_access_triggerZcan_access_viewcastZceilZceilingZchar_lengthZcharacter_lengthZcoercibilitycompressconcatZ	concat_wsZconnection_idconvZconvert_cpu_id_maskZ!convert_interval_to_user_intervalZ
convert_tzZcosZcotcountcrc32ZcurdateZcurrent_roleZcurtimeZdate_addZdate_formatZdate_subZdatediffZdaynameZ
dayofmonthZ	dayofweekZ	dayofyearZdegreeseltZexpZ
export_setextractZextractvalueZfieldZfind_in_setZfloorZformat_bytesZformat_pico_timeZ
found_rowsZfrom_base64Z	from_daysZfrom_unixtimeZget_dd_column_privilegesZget_dd_create_optionsZget_dd_index_private_dataZget_dd_index_sub_part_lengthZget_dd_property_key_valueZget_dd_tablespace_private_dataZget_lockZgreatestZgroup_concatZgtid_subsetZgtid_subtracthexZicu_versionZifnullZ
inet6_atonZ
inet6_ntoaZ	inet_atonZ	inet_ntoaZinstrZinternal_auto_incrementZinternal_avg_row_lengthZinternal_check_timeZinternal_checksumZinternal_data_freeZinternal_data_lengthZinternal_dd_char_lengthZinternal_get_comment_or_errorZinternal_get_dd_column_extraZinternal_get_enabled_role_jsonZinternal_get_hostnameZ!internal_get_mandatory_roles_jsonZ internal_get_partition_nodegroupZinternal_get_usernameZ"internal_get_view_warning_or_errorZ!internal_index_column_cardinalityZinternal_index_lengthZinternal_is_enabled_roleZinternal_is_mandatory_roleZinternal_keys_disabledZinternal_max_data_lengthZinternal_table_rowsZ#internal_tablespace_autoextend_sizeZinternal_tablespace_data_freeZinternal_tablespace_extent_sizeZinternal_tablespace_extraZ internal_tablespace_free_extentsZinternal_tablespace_idZ internal_tablespace_initial_sizeZ&internal_tablespace_logfile_group_nameZ(internal_tablespace_logfile_group_numberZ internal_tablespace_maximum_sizeZinternal_tablespace_row_formatZinternal_tablespace_statusZ!internal_tablespace_total_extentsZinternal_tablespace_typeZinternal_tablespace_versionZinternal_update_timeZis_free_lockZis_ipv4Zis_ipv4_compatZis_ipv4_mappedZis_ipv6Zis_used_lockZis_uuidZis_visible_dd_objectZisnullZ
json_arrayZjson_array_appendZjson_array_insertZjson_arrayaggZjson_containsZjson_contains_pathZ
json_depthZjson_extractZjson_insertZ	json_keysZjson_lengthZ
json_mergeZjson_merge_patchZjson_merge_preserveZjson_objectZjson_objectaggZjson_overlapsZjson_prettyZ
json_quoteZjson_removeZjson_replaceZjson_schema_validZjson_schema_validation_reportZjson_searchZjson_setZjson_storage_freeZjson_storage_sizeZ	json_typeZjson_unquoteZ
json_validZlast_dayZlast_insert_idZlcaseZleastlengthZlike_range_maxZlike_range_minZlnZ	load_fileZlocatelogZlog10Zlog2lowerZlpadZltrimZmake_setZmakedateZmaketimeZmaster_pos_waitmaxZmbrcontainsZmbrcoveredbyZ	mbrcoversZmbrdisjointZ	mbrequalsZmbrintersectsZmbroverlapsZ
mbrtouchesZ	mbrwithinZmd5ZmidminZ	monthnameZ
name_constZnowZnullifoctZoctet_lengthordZ
period_addZperiod_diffZpiZpositionpowZpowerZps_current_thread_idZps_thread_idquoteZradiansZrandZrandom_bytesZregexp_instrZregexp_likeZregexp_replaceZregexp_substrZrelease_all_locksrelease_lockZremove_dd_property_keyreverseZroles_graphmlroundZrpadZrtrimZsec_to_timeZsession_userZshaZsha1Zsha2signZsinsleepZsoundexspaceZsqrtZst_areaZst_asbinaryZst_asgeojsonZ	st_astextZst_aswkbZst_aswktZ	st_bufferZst_buffer_strategyZst_centroidZst_containsZst_convexhullZ
st_crossesZst_differenceZst_dimensionZst_disjointZst_distanceZst_distance_sphereZst_endpointZst_envelopeZ	st_equalsZst_exteriorringZ
st_geohashZst_geomcollfromtextZst_geomcollfromtxtZst_geomcollfromwkbZst_geometrycollectionfromtextZst_geometrycollectionfromwkbZst_geometryfromtextZst_geometryfromwkbZst_geometrynZst_geometrytypeZst_geomfromgeojsonZst_geomfromtextZst_geomfromwkbZst_interiorringnZst_intersectionZst_intersectsZst_isclosedZ
st_isemptyZst_issimpleZ
st_isvalidZst_latfromgeohashZst_latitudeZ	st_lengthZst_linefromtextZst_linefromwkbZst_linestringfromtextZst_linestringfromwkbZst_longfromgeohashZst_longitudeZst_makeenvelopeZst_mlinefromtextZst_mlinefromwkbZst_mpointfromtextZst_mpointfromwkbZst_mpolyfromtextZst_mpolyfromwkbZst_multilinestringfromtextZst_multilinestringfromwkbZst_multipointfromtextZst_multipointfromwkbZst_multipolygonfromtextZst_multipolygonfromwkbZst_numgeometriesZst_numinteriorringZst_numinteriorringsZst_numpointsZst_overlapsZst_pointfromgeohashZst_pointfromtextZst_pointfromwkbZ	st_pointnZst_polyfromtextZst_polyfromwkbZst_polygonfromtextZst_polygonfromwkbZst_simplifyZst_sridZst_startpointZ	st_swapxyZst_symdifferenceZ
st_touchesZst_transformZst_unionZst_validateZ	st_withinZst_xZst_yZstatement_digestZstatement_digest_textZstdZstddevZ
stddev_popZstddev_sampZstr_to_dateZstrcmpZsubdateZsubstrZ	substringZsubstring_indexZsubtimesumZsysdateZsystem_userZtanZtime_formatZtime_to_secZtimediffZ	to_base64Zto_daysZ
to_secondsZtrimZucaseZ
uncompressZuncompressed_lengthZunhexZunix_timestampZ	updatexmlupperZuuidZ
uuid_shortZuuid_to_binZvalidate_password_strengthZvar_popZvar_sampZvarianceversionZwait_for_executed_gtid_setZ!wait_until_sql_thread_after_gtidsZweekdayZ
weekofyearZyearweek)(ZbkaZbnlZdupsweedoutZ
firstmatchZgroup_indexZ	hash_joinindexZindex_mergeZ
intoexistsZjoin_fixed_orderZ
join_indexZ
join_orderZjoin_prefixZjoin_suffixZ	loosescanZmaterializationZmax_execution_timemergeZmrrZno_bkaZno_bnlZno_group_indexZno_hash_joinZno_icpZno_indexZno_index_mergeZno_join_indexZno_mergeZno_mrrZno_order_indexZno_range_optimizationZno_semijoinZno_skip_scanZorder_indexZqb_nameZresource_groupZsemijoinZset_varZ	skip_scanZsubquery(  Z
accessibleZaccountactionZactiveaddZadminZafterZagainstZ	aggregate	algorithmallZalteralwaysZanalyzeandanyZarrayasZascasciiZ
asensitiveZatZ	attributeZauto_incrementZautoextend_sizeZavgZavg_row_lengthZbackupbeforeZbeginZbetweenZbinlogblockZbothZbtreeZbucketsZbyZbytecachecallZcascadeZcascadedZcaseZcatalog_namechainZchangeZchangedZchannel	charactercharsetcheckZchecksumZcipherZclass_originZclientZclonecloseZcoalescecodeZcollateZ	collationcolumnZcolumn_formatZcolumn_namecolumnsZcommentZcommitZ	committedZcompactZ
completionZ	component
compressedcompressionZ
concurrentZ	conditionZ
connectionZ
consistentZ
constraintZconstraint_catalogZconstraint_nameZconstraint_schemacontainscontextcontinueZconvertZcpuZcreateZcrossZcubeZ	cume_distcurrentZcurrent_dateZcurrent_timeZcurrent_timestampZcurrent_userZcursorZcursor_namedataZdatabaseZ	databasesZdatafileZdayZday_hourZday_microsecondZ
day_minuteZ
day_secondZ
deallocateZdeclaredefaultZdefault_authZdefinerZ
definitionZdelay_key_writeZdelayeddeleteZ
dense_rankZdescZdescribedescriptionZdeterministicZdiagnosticsZ	directorydisablediscardZdiskZdistinctZdistinctrowZdivZdoZdropZdualZdumpfileZ	duplicateZdynamicZeachelseZelseifemptyenableZenclosedZ
encryptionendZendsZenforcedZengineZengine_attributeZengineserrorerrorsescapeZescapedZeventZeventsZeveryexceptZexchangeZexcludeZexecuteexistsexitZ	expansionZexpireZexplainZexportZextendedZextent_sizeZfailed_login_attemptsr   ZfastZfaultsZfetchfieldsfileZfile_block_sizefilterfirstZfirst_valueflushZ	followingZfollowsforforceZforeignformatfoundfromZfullZfulltextfunctionZgeneralZ	generatedZgeomcollectiongetZ
get_formatZget_master_public_keyglobalZgrantZgrantsgroupZgroup_replicationgroupinggroupsZhandlerhashZhavinghelpZhigh_priorityZ	histogramhistoryhostZhostsZhourZhour_microsecondZhour_minuteZhour_secondZ
identifiedifignoreZignore_server_idsimportinZinactiver2   ZindexesZinfileZinitial_sizeinnerZinoutZinsensitiveinsertZinsert_methodinstallinstanceintervalZintoZ	invisibleZinvokerioZio_after_gtidsZio_before_gtidsZ	io_threadZipcisZ	isolationZissuerZiteratejoinZ
json_tableZ
json_valuekeyZkey_block_sizekeyskillZlaglanguageZlast
last_valueZlateralZleadZleadingZleaveZleavesleftZlesslevelZlikelimitZlinearlineslistloadlocal	localtimeZlocaltimestamplocklockedlocksZlogfileZlogsZloopZlow_priorityZmasterZmaster_auto_positionZmaster_bindZmaster_compression_algorithmsZmaster_connect_retryZmaster_delayZmaster_heartbeat_periodZmaster_hostZmaster_log_fileZmaster_log_posZmaster_passwordZmaster_portZmaster_public_key_pathZmaster_retry_countZmaster_server_idZ
master_sslZmaster_ssl_caZmaster_ssl_capathZmaster_ssl_certZmaster_ssl_cipherZmaster_ssl_crlZmaster_ssl_crlpathZmaster_ssl_keyZmaster_ssl_verify_server_certZmaster_tls_ciphersuitesZmaster_tls_versionZmaster_userZmaster_zstd_compression_levelmatchZmax_connections_per_hourZmax_queries_per_hourZmax_rowsZmax_sizeZmax_updates_per_hourZmax_user_connectionsZmaxvalueZmediummemberZmemoryr3   Zmessage_textZmicrosecondZmigrateZmin_rowsZminuteZminute_microsecondZminute_secondmodmodeZmodifiesZmodifyZmonthZmutexZmysql_errnonamenamesZnaturalZndbZ
ndbclusternestedZnetwork_namespacenevernewnextnoZno_waitZno_write_to_binlogZ	nodegroupZnonenotZnowaitZ	nth_valueZntiler   ZnullsZnumberZofZoffoffsetZojoldZonZoneZonlyopenoptimizeZoptimizer_costsoptionZoptionalZ
optionallyoptionsororderZ
ordinalityZorganizationZothersoutZouterZoutfileZoverownerZ	pack_keysZpageparserpartial	partitionZpartitioningZ
partitionspasswordZpassword_lock_timepathZpercent_rankZpersistZpersist_onlyZphaseZpluginZ
plugin_dirZpluginsportprecedesZ	precedingZprepareZpreserveprevZprimaryZprivilege_checks_userZ
privilegesZ	procedureZprocessZprocesslistZprofileZprofilesproxypurgeZquarterqueryZquickZrandomrangeZrankreadZ	read_onlyZ
read_writeZreadsZrebuildZrecover	recursiveZredo_buffer_sizeZ	redundantZ	referenceZ
referencesZregexpZrelayZrelay_log_fileZrelay_log_posZrelay_threadZrelaylogreleasereloadremoverenameZ
reorganizeZrepairrepeatZ
repeatablereplaceZreplicate_do_dbZreplicate_do_tableZreplicate_ignore_dbZreplicate_ignore_tableZreplicate_rewrite_dbZreplicate_wild_do_tableZreplicate_wild_ignore_tableZreplicationZrequireZrequire_row_formatZrequire_table_primary_key_checkresetZresignalresourceZrespectZrestartZrestoreZrestrictZresumeZretainreturnZreturned_sqlstateZ	returningreturnsZreuser*   ZrevokerightZrlikeZroleZrollbackZrolluprotateZroutinerowZ	row_countZ
row_formatZ
row_numberZrowsZrtreeZ	savepointZscheduleZschemaZschema_nameZschemassecondZsecond_microsecondZ	secondaryZsecondary_engineZsecondary_engine_attributeZsecondary_loadZsecondary_unloadZsecurityZselectZ	sensitive	separatorZserializableZserverZsessionZshareZshowZshutdownsignalZsignedsimpleskipZslaveZslowZsnapshotZsocketZsomeZsonameZsoundssourceZspatialZspecificZsqlZsql_after_gtidsZsql_after_mts_gapsZsql_before_gtidsZsql_big_resultZsql_buffer_resultZsql_calc_found_rowsZsql_no_cacheZsql_small_resultZ
sql_threadZsql_tsi_dayZsql_tsi_hourZsql_tsi_minuteZsql_tsi_monthZsql_tsi_quarterZsql_tsi_secondZsql_tsi_weekZsql_tsi_yearZsqlexceptionZsqlstateZ
sqlwarningZsridZsslZstackedstartZstartingZstartsZstats_auto_recalcZstats_persistentZstats_sample_pagesstatusstopZstorageZstoredZstraight_joinstreamstringZsubclass_originZsubjectZsubpartitionZsubpartitionssuperZsuspendZswapsZswitchessystemtableZtable_checksumZ
table_nameZtablesZ
tablespaceZ	temporaryZ	temptableZ
terminatedZthanZthenZthread_priorityZtiesZtimestampaddZtimestampdiffZtlstoZtrailingZtransactionZtriggerZtriggersr   truncatetypetypesZ	unboundedZuncommittedZ	undefinedZundoZundo_buffer_sizeZundofileZunicodeZ	uninstallunionuniquer   ZunlockZunsignedZuntilupdateZupgradeusageZuseZuse_frmuserZuser_resourcesZusingZutc_dateZutc_timeZutc_timestampZ
validationvaluevaluesZ	variablesZvcpuviewZvirtualZvisiblewaitwarningsZweekZweight_stringZwhenwherewhileZwindowwithZwithoutZworkwrapperwriteZx509ZxaZxidZxmlxorZ
year_monthZzerofill__main__    N)urlopen)format_linesz-https://github.com/mysql/mysql-server/raw/8.0z
/sql/lex.hz/sql/item_create.ccc                  C   s   t t jddd} t| }t| }t| }t t jddd}|t	| |t
t8 }tdtt| tdtt| tdtt| d S )Nutf8rt   )rZ   MYSQL_FUNCTIONSMYSQL_KEYWORDSMYSQL_OPTIMIZER_HINTS)r   LEX_URLr   decodeparse_lex_keywordsparse_lex_functionsparse_lex_optimizer_hintsITEM_CREATE_URLr   parse_item_create_functionsr   MYSQL_DATATYPESupdate_contenttuplesorted)Zlex_filekeywordsZ	functionsZoptimizer_hintsZitem_create_file r   >lib/python3.9/site-packages/pygments/lexers/_mysql_builtins.pyupdate_myself  s    r   c                 C   sB   t  }tjd| tjdD ]}||d  q|s>td|S )zParse keywords in lex.h.z({SYM(?:_HK)?\("(?P<keyword>[a-z0-9_]+)",flagskeywordzNo keywords foundr   refinditerIr5   rl   r"   
ValueErrorfresultsmr   r   r   r     s    r   c                 C   sB   t  }tjd| tjdD ]}||d  q|s>td|S )zParse optimizer hints in lex.h.z"{SYM_H\("(?P<keyword>[a-z0-9_]+)",r   r   zNo optimizer hints foundr   r  r   r   r   r     s    r   c                 C   sB   t  }tjd| tjdD ]}||d  q|s>td|S )z&Parse MySQL function names from lex.h.z%{SYM_FN?\("(?P<function>[a-z0-9_]+)",r   ri   zNo lex functions foundr   r  r   r   r   r     s    r   c                 C   sB   t  }tjd| tjdD ]}||d  q|s>td|S )z/Parse MySQL function names from item_create.cc.z({"(?P<function>[^"]+?)",\s*SQL_F[^(]+?\(r   ri   zNo item_create functions foundr   r  r   r   r   r     s    r   c                 C   s   t t}| }W d   n1 s&0    Y  td|  tjtjB }||}|sbtd|  t	| |}|d|
  | || d  }t tddd}|| W d   n1 s0    Y  dS )zAOverwrite this file with content parsed from MySQL's source code.Nz^%s\s*=\s*\($.*?^\s*\)$z,Could not find an existing definition for %sw
)newline)r   __file__r   r   compileMSsearchr   r   r   rX   r   )
field_nameZcontentr  rO   Zre_matchr  Z	new_blockr   r   r   r     s    
&

$r   )__doc__ZMYSQL_CONSTANTSr   r   r   r   __name__r   Zurllib.requestr   Zpygments.utilr   Z
SOURCE_URLr   r   r   r   r   r   r   r   r   r   r   r   <module>   s4   L  {,     