jush.tr.sql = { one: /-- |#|--(?=\n|$)/, com_code: /\/\*![0-9]*|\*\//, com: /\/\*/, sql_sqlset: /(\s*)(SET)(\s+|$)(?!NAMES\b|CHARACTER\b|PASSWORD\b|(?:GLOBAL\s+|SESSION\s+)?TRANSACTION\b|@[^@]|NEW\.|OLD\.)/i, sql_code: /()/ };
jush.tr.sql_code = { sql_apo: /'/, sql_quo: /"/, bac: /`/, one: /-- |#|--(?=\n|$)/, com_code: /\/\*![0-9]*|\*\//, com: /\/\*/, sql_var: /\B@/, num: jush.num, _1: /;|\b(THEN|ELSE|LOOP|REPEAT|DO)\b/i };
jush.tr.sql_sqlset = { one: /-- |#|--(?=\n|$)/, com: /\/\*/, sqlset_val: /=/, _1: /;|$/ };
jush.tr.sqlset_val = { sql_apo: /'/, sql_quo: /"/, bac: /`/, one: /-- |#|--(?=\n|$)/, com: /\/\*/, _1: /,/, _2: /;|$/, num: jush.num }; //! comma can be inside function call
jush.tr.sqlset = { _0: /$/ }; //! jump from SHOW VARIABLES LIKE ''
jush.tr.sqlstatus = { _0: /$/ }; //! jump from SHOW STATUS LIKE ''
jush.tr.com_code = { _1: /()/ };

jush.urls.sql_sqlset = 'https://dev.mysql.com/doc/mysql/en/$key';
jush.links.sql_sqlset = { 'set-statement.html': /.+/ };

jush.link_key.sql = jush.link_key.sqlset = jush.link_key.sqlstatus = (key, url) => { // keys may be 'mysql-key maria-key'
	const keys = key.split(' ');
	return (/mariadb/.test(url[0]) ? (keys.length > 1 ? keys[1] : keys[0].replace('.html', '/')) : keys[0]);
};

jush.slugs.sql = (name, key, url) => name.replace(/\b(ALTER|CREATE|DROP|RENAME|SHOW)\s+SCHEMA\b/, '$1 DATABASE').toLowerCase().replace((/mariadb/.test(url[0]) ? /\s+/g : /\s+|_/g), '-'); // MariaDB keeps underscores in slugs
jush.slugs.sqlset = (name, key, url) => (/mariadb/.test(url[0]) ? name : (jush.links2.sqlset.test(name.replace(/_/g, '-')) ? name.replace(/_/g, '-') : name)).toLowerCase();
jush.slugs.sqlstatus = (name, key, url) => (/mariadb/.test(url[0]) ? name.toLowerCase() : name);

jush.build_links2('sql', 'https://dev.mysql.com/doc/mysql/en/$key', /(\b)/, /(\b)/gi, {
	'alter-event.html': /(ALTER(?:\s+DEFINER\s*=\s*\S+)?\s+EVENT)/,
	'alter-table.html': /(ALTER(?:\s+ONLINE|\s+OFFLINE)?(?:\s+IGNORE)?\s+TABLE)/,
	'alter-view.html': /(ALTER(?:\s+ALGORITHM\s*=\s*(?:UNDEFINED|MERGE|TEMPTABLE))?(?:\s+DEFINER\s*=\s*\S+)?(?:\s+SQL\s+SECURITY\s+(?:DEFINER|INVOKER))?\s+VIEW)/,
	'analyze-table.html': /(ANALYZE(?:\s+NO_WRITE_TO_BINLOG|\s+LOCAL)?\s+TABLE)/,
	'create-event.html': /(CREATE(?:\s+DEFINER\s*=\s*\S+)?\s+EVENT)/,
	'create-function.html': /(CREATE(?:\s+DEFINER\s*=\s*\S+)?\s+FUNCTION)/,
	'create-procedure.html': /(CREATE(?:\s+DEFINER\s*=\s*\S+)?\s+PROCEDURE)/,
	'create-index.html': /(CREATE(?:\s+ONLINE|\s+OFFLINE)?(?:\s+UNIQUE|\s+FULLTEXT|\s+SPATIAL|\s+VECTOR)?\s+INDEX)/,
	'create-table.html': /(CREATE(?:\s+TEMPORARY)?\s+TABLE)/,
	'create-trigger.html': /(CREATE(?:\s+DEFINER\s*=\s*\S+)?\s+TRIGGER)/,
	'create-view.html': /(CREATE(?:\s+OR\s+REPLACE)?(?:\s+ALGORITHM\s*=\s*(?:UNDEFINED|MERGE|TEMPTABLE))?(?:\s+DEFINER\s*=\s*\S+)?(?:\s+SQL\s+SECURITY\s+(?:DEFINER|INVOKER))?\s+VIEW)/,
	'drop-index.html': /(DROP(?:\s+ONLINE|\s+OFFLINE)?\s+INDEX)/,
	'drop-table.html': /(DROP(?:\s+TEMPORARY)?\s+TABLE)/,
	'begin-end.html': /(END)/,
	'optimize-table.html': /(OPTIMIZE(?:\s+NO_WRITE_TO_BINLOG|\s+LOCAL)?\s+TABLE)/,
	'repair-table.html': /(REPAIR(?:\s+NO_WRITE_TO_BINLOG|\s+LOCAL)?\s+TABLE)/,
	'set-transaction.html': /(SET(?:\s+GLOBAL|\s+SESSION)?\s+TRANSACTION\s+ISOLATION\s+LEVEL)/,
	'show-columns.html': /(SHOW(?:\s+FULL)?\s+COLUMNS)/,
	'show-engines.html': /(SHOW(?:\s+STORAGE)?\s+ENGINES)/,
	'show-index.html': /(SHOW\s+(?:INDEX|INDEXES|KEYS))/,
	'show-processlist.html': /(SHOW(?:\s+FULL)?\s+PROCESSLIST)/,
	'show-status.html': /(SHOW(?:\s+GLOBAL|\s+SESSION)?\s+STATUS)/,
	'show-tables.html': /(SHOW(?:\s+FULL)?\s+TABLES)/,
	'show-variables.html': /(SHOW(?:\s+GLOBAL|\s+SESSION)?\s+VARIABLES)/,
	'join.html join-syntax/': /(JOIN)/,
	// statements (generated by update/sql.php)
	'$1-statements.html ': /(SQL)(?!\()/,
	'- $1-sequence_name/': /(NEXT\s+VALUE\s+FOR|PREVIOUS\s+VALUE\s+FOR)(?!\()/,
	'- legacy-commands-$1/': /(RESET\s+SLAVE|SHOW\s+SLAVE\s+HOSTS|SHOW\s+SLAVE\s+STATUS|START\s+SLAVE|STOP\s+SLAVE)(?!\()/,
	'- show-binlog-status/': /(SHOW\s+MASTER\s+STATUS)(?!\()/,
	'- transactions-$1/': /(READ\s+COMMITTED|READ\s+UNCOMMITTED|REPEATABLE\s+READ|SERIALIZABLE)(?!\()/,
	'load-index.html -': /(LOAD\s+INDEX\s+INTO\s+CACHE)(?!\()/,
	' $1/': /(CONSTRAINT|DECLARE\s+CONDITION|DECLARE\s+CURSOR|DROP\s+PROCEDURE|DUAL|EXPLAIN\s+ANALYZE|FETCH|FOR\s+UPDATE|FOR|GROUP\s+BY|IGNORE|INSERT\s+IGNORE|INSERT\s+SELECT|LIMIT|LOAD\s+INDEX|ORDER\s+BY|PROCEDURE|REPEAT\s+LOOP|SELECT\s+INTO\s+OUTFILE|SHOW\s+ANALYZE|SHOW\s+EXPLAIN|SQLSTATE|WITH(?!\s+(?:QUERY\s+EXPANSION|ROLLUP)))(?!\()/,
	'show-parse-tree.html -': /(SHOW\s+PARSE_TREE)(?!\()/,
	'start-group-replication.html -': /(START\s+GROUP_REPLICATION)(?!\()/,
	'stop-group-replication.html -': /(STOP\s+GROUP_REPLICATION)(?!\()/,
	'- $1/': /(ALTER\s+SEQUENCE|BACKUP\s+LOCK|BACKUP\s+STAGE|BEGIN\s+END|CHANGE\s+MASTER\s+TO|CHECK\s+VIEW|CLOSE|CREATE\s+PACKAGE\s+BODY|CREATE\s+PACKAGE|CREATE\s+SEQUENCE|DECLARE\s+HANDLER|DECLARE\s+TYPE|DROP\s+PACKAGE\s+BODY|DROP\s+PACKAGE|DROP\s+SEQUENCE|EXECUTE\s+IMMEDIATE|FLUSH\s+QUERY\s+CACHE|FLUSH\s+TABLES\s+FOR\s+EXPORT|GOTO|INSERT\s+ON\s+DUPLICATE\s+KEY\s+UPDATE|INSTALL\s+SONAME|LASTVAL|LOAD\s+DATA\s+INFILE|LOCK\s+IN\s+SHARE\s+MODE|MINUS|NEXTVAL|OPEN|REPAIR\s+VIEW|RESET\s+MASTER|SELECT\s+INTO\s+DUMPFILE|SELECT\s+WITH\s+ROLLUP|SET\s+PATH|SET\s+STATEMENT|SETVAL|SHOW\s+AUTHORS|SHOW\s+CONTRIBUTORS|SHOW\s+CREATE\s+PACKAGE\s+BODY|SHOW\s+CREATE\s+PACKAGE|SHOW\s+CREATE\s+SEQUENCE|SHOW\s+CREATE\s+SERVER|SHOW\s+ENGINE\s+INNODB\s+STATUS|SHOW\s+LOCALES|SHOW\s+PACKAGE\s+BODY\s+STATUS|SHOW\s+PACKAGE\s+STATUS|SHOW\s+PLUGINS\s+SONAME|SHOW\s+REPLICA\s+HOSTS|UNINSTALL\s+SONAME(?!\()|(?:add_months|aswkb|binlog_gtid_pos|buffer|centroid|chr|column_add|column_check|column_create|column_delete|column_exists|column_get|column_json|column_list|contains|convexhull|crc32c|crosses|decode|decode_histogram|des_decrypt|des_encrypt|dimension|disjoint|encode|encrypt|equals|geometrycollectionfromtext|geometrycollectionfromwkb|geometryfromtext|geometryfromwkb|glength|inet6_aton|inet6_ntoa|intersects|is_ipv4|is_ipv4_compat|is_ipv4_mapped|is_ipv6|isclosed|isring|json_array_intersect|json_compact|json_detailed|json_equals|json_exists|json_key_value|json_loose|json_normalize|json_object_filter_keys|json_object_to_array|json_query|kdf|linestringfromtext|linestringfromwkb|master_gtid_wait|mbrequal|md5|median|mlinefromtext|mlinefromwkb|mpointfromtext|mpointfromwkb|mpolyfromtext|mpolyfromwkb|multilinestringfromtext|multilinestringfromwkb|multipointfromtext|multipointfromwkb|multipolygonfromtext|multipolygonfromwkb|natural_sort_key|old_password|overlaps|password|percentile_cont|percentile_disc|pointonsurface|polygonfromtext|polygonfromwkb|setval|sha1|st_aswkb|st_aswkt|st_boundary|st_geometrycollectionfromtext|st_geometrycollectionfromwkb|st_geometryfromtext|st_geometryfromwkb|st_isring|st_linestringfromtext|st_linestringfromwkb|st_numinteriorrings|st_pointonsurface|st_polygonfromtext|st_polygonfromwkb|st_relate|sys_guid|to_char|to_number|touches|trunc|vec_distance_cosine|vec_distance_euclidean|vec_fromtext|vec_totext|within|wsrep_last_seen_gtid|wsrep_last_written_gtid|wsrep_sync_wait_upto_gtid|xor)(?=\s*\(|$))/,
	' selectinto/': /(SELECT\s+INTO)(?!\()/,
	'$1.html -': /(ALTER\s+INSTANCE|ALTER\s+JSON\s+DUALITY\s+VIEW|ALTER\s+LIBRARY|ALTER\s+RESOURCE\s+GROUP|CHANGE\s+REPLICATION\s+FILTER|CHANGE\s+REPLICATION\s+SOURCE\s+TO|CLONE|CREATE\s+JSON\s+DUALITY\s+VIEW|CREATE\s+LIBRARY|CREATE\s+MASKING\s+POLICY|CREATE\s+RESOURCE\s+GROUP|CREATE\s+SPATIAL\s+REFERENCE\s+SYSTEM|DEALLOCATE\s+PREPARE|DROP\s+LIBRARY|DROP\s+MASKING\s+POLICY|DROP\s+RESOURCE\s+GROUP|DROP\s+SPATIAL\s+REFERENCE\s+SYSTEM|EXECUTE|HANDLER|HELP|IMPORT\s+TABLE|INSTALL\s+COMPONENT|LOAD\s+DATA|PREPARE|RESET\s+BINARY\s+LOGS\s+AND\s+GTIDS|RESET\s+PERSIST|RESTART|SET\s+RESOURCE\s+GROUP|SHOW\s+BINARY\s+LOG\s+STATUS|SHOW\s+CREATE\s+LIBRARY|SHOW\s+CREATE\s+MASKING\s+POLICY|SHOW\s+LIBRARY\s+STATUS|SHOW\s+REPLICAS|UNINSTALL\s+COMPONENT)(?!\()/,
	'$1.html': /(ALTER\s+(?:DATABASE|SCHEMA)|ALTER\s+FUNCTION|ALTER\s+LOGFILE\s+GROUP|ALTER\s+PROCEDURE|ALTER\s+SERVER|ALTER\s+TABLESPACE|ALTER\s+USER|BINLOG|CACHE\s+INDEX|CALL|CHECK\s+TABLE|CHECKSUM\s+TABLE|CREATE\s+(?:DATABASE|SCHEMA)|CREATE\s+LOGFILE\s+GROUP|CREATE\s+ROLE|CREATE\s+SERVER|CREATE\s+TABLESPACE|CREATE\s+USER|DELETE|DESCRIBE|DO|DROP\s+(?:DATABASE|SCHEMA)|DROP\s+EVENT|DROP\s+FUNCTION|DROP\s+LOGFILE\s+GROUP|DROP\s+ROLE|DROP\s+SERVER|DROP\s+TABLESPACE|DROP\s+TRIGGER|DROP\s+USER|DROP\s+VIEW|EXCEPT|EXPLAIN|FLUSH|GET\s+DIAGNOSTICS|GRANT|INSERT\s+DELAYED|INSERT|INSTALL\s+PLUGIN|INTERSECT|KILL|LOAD\s+XML|PURGE\s+BINARY\s+LOGS|RENAME\s+TABLE|RENAME\s+USER|REPLACE|RESET\s+REPLICA|RESET|RESIGNAL|RETURN|REVOKE|SELECT|SET\s+DEFAULT\s+ROLE|SET\s+PASSWORD|SET\s+ROLE|SET\s+TRANSACTION|SHOW\s+BINARY\s+LOGS|SHOW\s+BINLOG\s+EVENTS|SHOW\s+CHARACTER\s+SET|SHOW\s+COLLATION|SHOW\s+CREATE\s+(?:DATABASE|SCHEMA)|SHOW\s+CREATE\s+EVENT|SHOW\s+CREATE\s+FUNCTION|SHOW\s+CREATE\s+PROCEDURE|SHOW\s+CREATE\s+TABLE|SHOW\s+CREATE\s+TRIGGER|SHOW\s+CREATE\s+USER|SHOW\s+CREATE\s+VIEW|SHOW\s+(?:DATABASE|SCHEMA)S|SHOW\s+ENGINE|SHOW\s+ERRORS|SHOW\s+EVENTS|SHOW\s+FUNCTION\s+CODE|SHOW\s+FUNCTION\s+STATUS|SHOW\s+GRANTS|SHOW\s+OPEN\s+TABLES|SHOW\s+PLUGINS|SHOW\s+PRIVILEGES|SHOW\s+PROCEDURE\s+CODE|SHOW\s+PROCEDURE\s+STATUS|SHOW\s+PROFILE|SHOW\s+PROFILES|SHOW\s+RELAYLOG\s+EVENTS|SHOW\s+REPLICA\s+STATUS|SHOW\s+TABLE\s+STATUS|SHOW\s+TRIGGERS|SHOW\s+WARNINGS|SHUTDOWN|SIGNAL|START\s+REPLICA|STOP\s+REPLICA|UNINSTALL\s+PLUGIN|UNION|UPDATE)(?!\()/,
	'$1.html ': /(DECLARE|SHOW|TABLE|USE|VALUES)(?!\()/,
	// end statements
	'$1-statement.html': /(LOOP|LEAVE|ITERATE|WHILE)/,
	'if-statement.html': /(IF|ELSEIF)(?!\()/,
	'repeat-statement.html': /(REPEAT|UNTIL)(?!\()/,
	'truncate-table.html': /(TRUNCATE(?:\s+TABLE)?)(?!\()/,
	'commit.html': /(START\s+TRANSACTION|BEGIN|COMMIT|ROLLBACK(?!\s+(?:TO\s+SAVEPOINT)))/,
	'savepoints.html': /(SAVEPOINT|ROLLBACK\s+TO\s+SAVEPOINT)/,
	'lock-tables.html': /((?:UN)?LOCK\s+TABLES?)/,
	'charset-connection.html': /(SET\s+NAMES|SET\s+CHARACTER\s+SET)/,
	'insert-on-duplicate.html': /(ON\s+DUPLICATE\s+KEY\s+UPDATE)/,
	'fulltext-search.html': /(IN\s+BOOLEAN\s+MODE|IN\s+NATURAL\s+LANGUAGE\s+MODE|WITH\s+QUERY\s+EXPANSION)/,
	'example-auto-increment.html auto_increment/': /(AUTO_INCREMENT)/,
	'comparison-operators.html#operator_$1': /(IS(?!\s+(?:NULL))|IS\s+NULL)/,
	'comparison-operators.html#function_$1': /((?:BETWEEN|NOT\s+BETWEEN|IN|NOT\s+IN)(?!\()|(?:coalesce|greatest|interval|isnull|least)(?=\s*\(|$))/,
	'any-in-some-subqueries.html': /(ANY|IN|SOME)(?=\s*\(|$)/,
	'all-subqueries.html': /(ALL)/,
	'exists-and-not-exists-subqueries.html': /(EXISTS|NOT\s+EXISTS)/,
	'group-by-modifiers.html': /(WITH\s+ROLLUP)/,
	'string-functions.html#operator_$1': /(SOUNDS\s+LIKE)/,
	'string-comparison-functions.html#operator_$1': /(LIKE|NOT\s+LIKE)/,
	'regexp.html#operator_$1': /(NOT\s+REGEXP|REGEXP)/,
	'regexp.html#operator_regexp': /(RLIKE)/,
	'logical-operators.html#operator_$1': /(NOT|AND|OR|XOR)(?!\()/,
	'control-flow-functions.html#operator_$1': /(CASE)/,
	'arithmetic-functions.html#operator_$1': /(DIV)/,
	'cast-functions.html#operator_$1': /(BINARY)/,
	'date-and-time-functions.html#function_$1': /(CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|LOCALTIME|LOCALTIMESTAMP|UTC_DATE|UTC_TIME|UTC_TIMESTAMP|(?:adddate|addtime|convert_tz|curdate|curtime|date|date_add|date_format|date_sub|datediff|day|dayname|dayofmonth|dayofweek|dayofyear|extract|from_days|from_unixtime|get_format|hour|last_day|makedate|maketime|microsecond|minute|month|monthname|now|period_add|period_diff|quarter|sec_to_time|second|str_to_date|subdate|subtime|sysdate|time|time_format|time_to_sec|timediff|timestamp|timestampadd|timestampdiff|to_days|to_seconds|unix_timestamp|week|weekday|weekofyear|year|yearweek)(?=\s*\(|$))/,
	'date-and-time-functions.html#function_date-add': /(INTERVAL)/,
	'': /(ACCESSIBLE|ADD|ALTER|ANALYZE|AS|ASC|ASENSITIVE|BEFORE|BOTH|BY|CASCADE|CHANGE|CHARACTER|CHECK|COLLATE|COLUMN|CONDITION|CONTINUE|CONVERT|CREATE|CROSS|CUBE|CUME_DIST|CURSOR|DATABASE|DATABASES|DAY_HOUR|DAY_MICROSECOND|DAY_MINUTE|DAY_SECOND|DEFAULT|DELAYED|DENSE_RANK|DESC|DETERMINISTIC|DISTINCT|DISTINCTROW|DROP|EACH|ELSE|EMPTY|ENCLOSED|ESCAPED|EXIT|EXTERNAL|FALSE|FIRST_VALUE|FLOAT4|FLOAT8|FORCE|FOREIGN|FROM|FULLTEXT|FUNCTION|GENERAL|GENERATED|GET|GROUP|GROUPING|GROUPS|HAVING|HIGH_PRIORITY|HOUR_MICROSECOND|HOUR_MINUTE|HOUR_SECOND|INDEX|INFILE|INNER|INOUT|INSENSITIVE|INT1|INT2|INT3|INT4|INT8|INTO|IO_AFTER_GTIDS|IO_BEFORE_GTIDS|JSON_TABLE|KEY|KEYS|LAG|LAST_VALUE|LATERAL|LEAD|LEADING|LEFT|LIBRARY|LINEAR|LINES|LOAD|LOCK|LONG|LOW_PRIORITY|MATCH|MAXVALUE|MIDDLEINT|MINUTE_MICROSECOND|MINUTE_SECOND|MODIFIES|NATURAL|NO_WRITE_TO_BINLOG|NTH_VALUE|NTILE|NULL|OF|ON|OPTIMIZE|OPTIMIZER_COSTS|OPTION|OPTIONALLY|ORDER|OUT|OUTER|OUTFILE|OVER|PARTITION(?!\s+(?:BY\s+COLUMNS|BY\s+HASH|BY\s+KEY|BY\s+LINEAR\s+HASH|BY\s+LINEAR\s+KEY|BY\s+LIST|BY\s+RANGE))|PERCENT_RANK|PRECISION|PRIMARY|PURGE|QUALIFY|RANGE|RANK|READ|READS|READ_WRITE|RECURSIVE|REFERENCES|RELEASE|RENAME|REQUIRE|RESTRICT|RETURNING|RIGHT|ROW|ROWS|ROW_NUMBER|SCHEMA|SCHEMAS|SECOND_MICROSECOND|SENSITIVE|SEPARATOR|SLOW|SPATIAL|SPECIFIC|SQLEXCEPTION|SQLWARNING|SQL_BIG_RESULT|SQL_CALC_FOUND_ROWS|SQL_SMALL_RESULT|SSL|STARTING|STORED|STRAIGHT_JOIN|SYSTEM|TABLESAMPLE|TERMINATED|THEN|TO|TRAILING|TRIGGER|TRUE|UNDO|UNIQUE|UNLOCK|UNSIGNED|USAGE|USING|VARCHARACTER|VARYING|VIRTUAL|WHEN|WHERE|WINDOW|WRITE|YEAR_MONTH|ZEROFILL)(?!\()/,
	'numeric-type-syntax.html numeric-data-types/': /(bit|tinyint|bool|boolean|smallint|mediumint|int|integer|bigint|float|double\s+precision|double|real|decimal|dec|numeric|fixed)/,
	'date-and-time-type-syntax.html date-and-time-data-types/': /(date|datetime|timestamp|time|year)/,
	'string-type-syntax.html string-data-types/': /(char|varchar|binary|varbinary|tinyblob|tinytext|blob|text|mediumblob|mediumtext|longblob|longtext|enum|set)/,
	'spatial-type-overview.html geometry-types/': /(geometry|point|linestring|polygon|multipoint|multilinestring|multipolygon|geometrycollection)/,
	'vector.html vector/': /(vector)/,
	'- inet4/': /(inet4)/,
	'- inet6/': /(inet6)/,
	'mathematical-functions.html#function_$1': /(mod|(?:abs|acos|asin|atan|atan2|ceil|ceiling|conv|cos|cot|crc32|degrees|exp|floor|ln|log|log10|log2|pi|pow|power|radians|rand|round|sign|sin|sqrt|tan|truncate)(?=\s*\(|$))/,
	'information-functions.html#function_$1': /(CURRENT_USER|(?:benchmark|charset|coercibility|collation|connection_id|current_role|database|found_rows|icu_version|last_insert_id|roles_graphml|row_count|schema|session_user|system_user|user|version)(?=\s*\(|$))/,
	'$1-storage-engine.html': /(InnoDB|MyISAM|MEMORY|CSV|ARCHIVE|BLACKHOLE|MERGE|FEDERATED)/,
	'merge-storage-engine.html': /(MRG_MyISAM)/,
	'partitioning-range.html': /(PARTITION\s+BY\s+RANGE)/,
	'partitioning-list.html': /(PARTITION\s+BY\s+LIST)/,
	'partitioning-columns.html': /(PARTITION\s+BY\s+COLUMNS)/,
	'partitioning-hash.html': /(PARTITION\s+BY\s+HASH)/,
	'partitioning-linear-hash.html': /(PARTITION\s+BY\s+LINEAR\s+HASH)/,
	'partitioning-key.html': /(PARTITION\s+BY(?:\s+LINEAR)?\s+KEY)/,
	// functions (generated by update/sql.php)
	'- $11/': /(sha)(?=\s*\(|$)/,
	'- geometry-properties-$1/': /(issimple)(?=\s*\(|$)/,
	'- next-value-for-sequence_name/': /(nextval)(?=\s*\(|$)/,
	'- previous-value-for-sequence_name/': /(lastval)(?=\s*\(|$)/,
	'- st_$1/': /(area|asbinary|astext|aswkt|boundary|endpoint|envelope|exteriorring|geomcollfromtext|geomcollfromwkb|geometryn|geometrytype|geomfromtext|geomfromwkb|interiorringn|isempty|linefromtext|linefromwkb|numgeometries|numinteriorrings|numpoints|pointfromtext|pointfromwkb|pointn|polyfromtext|polyfromwkb|srid|startpoint|x|y)(?=\s*\(|$)/,
	'- st_geomfromtext/': /(st_multilinestringfromtext|st_multipointfromtext|st_multipolygonfromtext)(?=\s*\(|$)/,
	'- st_geomfromwkb/': /(st_multilinestringfromwkb|st_multipointfromwkb|st_multipolygonfromwkb)(?=\s*\(|$)/,
	'- uuid_v4/': /(uuidv4)(?=\s*\(|$)/,
	'- uuid_v7/': /(uuidv7)(?=\s*\(|$)/,
	'- vector-functions-$1/': /(vec_distance)(?=\s*\(|$)/,
	'aggregate-functions.html#function_$1 $1/': /(avg|bit_and|bit_or|bit_xor|count|group_concat|json_arrayagg|json_objectagg|max|min|std|stddev|stddev_pop|stddev_samp|sum|var_pop|var_samp|variance)(?=\s*\(|$)/,
	'bit-functions.html#function_$1 $1/': /(bit_count)(?=\s*\(|$)/,
	'cast-functions.html#function_$1 $1/': /(cast|convert)(?=\s*\(|$)/,
	'encryption-functions.html#function_$1 $1/': /(aes_decrypt|aes_encrypt|compress|sha2|uncompress|uncompressed_length)(?=\s*\(|$)/,
	'encryption-functions.html#function_$1 -': /(random_bytes|statement_digest|statement_digest_text|validate_password_strength)(?=\s*\(|$)/,
	'flow-control-functions.html#function_$1 $1-function/': /(if)(?=\s*\(|$)/,
	'flow-control-functions.html#function_$1 $1/': /(ifnull|nullif)(?=\s*\(|$)/,
	'gis-format-conversion-functions.html#function_$1 $1/': /(st_asbinary|st_astext)(?=\s*\(|$)/,
	'gis-format-conversion-functions.html#function_$1 -': /(st_swapxy)(?=\s*\(|$)/,
	'gis-general-property-functions.html#function_$1 $1/': /(st_dimension|st_envelope|st_geometrytype|st_isempty|st_issimple|st_srid)(?=\s*\(|$)/,
	'gis-geometrycollection-property-functions.html#function_$1 $1/': /(st_geometryn|st_numgeometries)(?=\s*\(|$)/,
	'gis-linestring-property-functions.html#function_$1 $1/': /(st_endpoint|st_isclosed|st_length|st_numpoints|st_pointn|st_startpoint)(?=\s*\(|$)/,
	'gis-mysql-specific-functions.html#function_$1 -': /(geomcollection)(?=\s*\(|$)/,
	'gis-point-property-functions.html#function_$1 $1/': /(st_x|st_y)(?=\s*\(|$)/,
	'gis-point-property-functions.html#function_$1 -': /(st_latitude|st_longitude)(?=\s*\(|$)/,
	'gis-polygon-property-functions.html#function_$1 $1/': /(st_area|st_centroid|st_exteriorring|st_interiorringn)(?=\s*\(|$)/,
	'gis-polygon-property-functions.html#function_$1s -': /(st_numinteriorring)(?=\s*\(|$)/,
	'gis-wkb-functions.html#function_$1 $1/': /(st_geomcollfromwkb|st_geomfromwkb|st_linefromwkb|st_pointfromwkb|st_polyfromwkb)(?=\s*\(|$)/,
	'gis-wkb-functions.html#function_$1 st_geomfromwkb/': /(st_mlinefromwkb|st_mpointfromwkb|st_mpolyfromwkb)(?=\s*\(|$)/,
	'gis-wkt-functions.html#function_$1 $1/': /(st_geomcollfromtext|st_geomfromtext|st_linefromtext|st_pointfromtext|st_polyfromtext)(?=\s*\(|$)/,
	'gis-wkt-functions.html#function_$1 st_geomfromtext/': /(st_mlinefromtext|st_mpointfromtext|st_mpolyfromtext)(?=\s*\(|$)/,
	'gtid-functions.html#function_$1 -': /(wait_for_executed_gtid_set)(?=\s*\(|$)/,
	'internal-functions.html#function_$1 -': /(can_access_column|can_access_database|can_access_table|can_access_user|can_access_view|get_dd_column_privileges|get_dd_create_options|get_dd_index_sub_part_length|internal_auto_increment|internal_avg_row_length|internal_check_time|internal_checksum|internal_data_free|internal_data_length|internal_dd_char_length|internal_get_comment_or_error|internal_get_enabled_role_json|internal_get_hostname|internal_get_username|internal_get_view_warning_or_error|internal_index_column_cardinality|internal_index_length|internal_is_enabled_role|internal_is_mandatory_role|internal_keys_disabled|internal_max_data_length|internal_table_rows|internal_update_time)(?=\s*\(|$)/,
	'json-attribute-functions.html#function_$1 $1/': /(json_depth|json_length|json_type|json_valid)(?=\s*\(|$)/,
	'json-creation-functions.html#function_$1 $1/': /(json_array|json_object|json_quote)(?=\s*\(|$)/,
	'json-creation-functions.html#function_$1 -': /(json_duality_object)(?=\s*\(|$)/,
	'json-modification-functions.html#function_$1 $1/': /(json_array_append|json_array_insert|json_insert|json_merge|json_remove|json_replace|json_set|json_unquote)(?=\s*\(|$)/,
	'json-modification-functions.html#function_$1 json_merge/': /(json_merge_patch|json_merge_preserve)(?=\s*\(|$)/,
	'json-search-functions.html#function_$1 $1/': /(json_contains|json_contains_path|json_extract|json_keys|json_overlaps|json_search|json_value)(?=\s*\(|$)/,
	'json-table-functions.html#function_$1 $1/': /(json_table)(?=\s*\(|$)/,
	'json-utility-functions.html#function_$1 $1/': /(json_pretty)(?=\s*\(|$)/,
	'json-utility-functions.html#function_$1 -': /(json_storage_free|json_storage_size)(?=\s*\(|$)/,
	'json-validation-functions.html#function_$1 $1/': /(json_schema_valid)(?=\s*\(|$)/,
	'json-validation-functions.html#function_$1 -': /(json_schema_validation_report)(?=\s*\(|$)/,
	'locking-functions.html#function_$1 $1/': /(get_lock|is_free_lock|is_used_lock|release_lock)(?=\s*\(|$)/,
	'locking-functions.html#function_$1 -': /(release_all_locks)(?=\s*\(|$)/,
	'miscellaneous-functions.html#function_$1 $1/': /(default|inet_aton|inet_ntoa|name_const|sleep|uuid|uuid_short)(?=\s*\(|$)/,
	'miscellaneous-functions.html#function_$1 -': /(any_value|bin_to_uuid|etag|grouping|is_uuid|uuid_to_bin|values)(?=\s*\(|$)/,
	'performance-schema-functions.html#function_$1 $1/': /(format_pico_time)(?=\s*\(|$)/,
	'performance-schema-functions.html#function_$1 -': /(ps_current_thread_id|ps_thread_id)(?=\s*\(|$)/,
	'performance-schema-functions.html#function_$1 miscellaneous-functions-$1/': /(format_bytes)(?=\s*\(|$)/,
	'regexp.html#function_$1 $1/': /(regexp_instr|regexp_replace|regexp_substr)(?=\s*\(|$)/,
	'regexp.html#function_$1 -': /(regexp_like)(?=\s*\(|$)/,
	'replication-functions-async-failover.html#function_$1 -': /(asynchronous_connection_failover_add_managed|asynchronous_connection_failover_add_source|asynchronous_connection_failover_delete_managed|asynchronous_connection_failover_delete_source|asynchronous_connection_failover_reset)(?=\s*\(|$)/,
	'replication-functions-synchronization.html#function_$1 $1/': /(master_pos_wait)(?=\s*\(|$)/,
	'replication-functions-synchronization.html#function_$1 -': /(source_pos_wait)(?=\s*\(|$)/,
	'spatial-aggregate-functions.html#function_$1 $1/': /(st_collect)(?=\s*\(|$)/,
	'spatial-convenience-functions.html#function_$1 $1/': /(st_distance_sphere|st_isvalid|st_simplify|st_validate)(?=\s*\(|$)/,
	'spatial-convenience-functions.html#function_$1 -': /(st_makeenvelope)(?=\s*\(|$)/,
	'spatial-geohash-functions.html#function_$1 $1/': /(st_geohash|st_latfromgeohash|st_longfromgeohash|st_pointfromgeohash)(?=\s*\(|$)/,
	'spatial-geojson-functions.html#function_$1 $1/': /(st_geomfromgeojson)(?=\s*\(|$)/,
	'spatial-geojson-functions.html#function_$1 geojson-$1/': /(st_asgeojson)(?=\s*\(|$)/,
	'spatial-operator-functions.html#function_$1 $1/': /(st_buffer|st_convexhull|st_difference|st_intersection|st_symdifference|st_union)(?=\s*\(|$)/,
	'spatial-operator-functions.html#function_$1 -': /(st_buffer_strategy|st_lineinterpolatepoint|st_lineinterpolatepoints|st_pointatdistance|st_transform)(?=\s*\(|$)/,
	'spatial-relation-functions-mbr.html#function_$1 $1/': /(mbrcontains|mbrcoveredby|mbrdisjoint|mbrintersects|mbroverlaps|mbrtouches|mbrwithin)(?=\s*\(|$)/,
	'spatial-relation-functions-mbr.html#function_$1 -': /(mbrcovers)(?=\s*\(|$)/,
	'spatial-relation-functions-mbr.html#function_$1 mbrequal/': /(mbrequals)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 $1/': /(st_disjoint|st_distance)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 -': /(st_frechetdistance|st_hausdorffdistance)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 st-contains/': /(st_contains)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 st-crosses/': /(st_crosses)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 st-equals/': /(st_equals)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 st-intersects/': /(st_intersects)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 st-overlaps/': /(st_overlaps)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 st-touches/': /(st_touches)(?=\s*\(|$)/,
	'spatial-relation-functions-object-shapes.html#function_$1 st-within/': /(st_within)(?=\s*\(|$)/,
	'string-comparison-functions.html#function_$1 $1/': /(strcmp)(?=\s*\(|$)/,
	'string-functions.html#function_$1 $1/': /(ascii|bin|bit_length|char_length|character_length|concat|concat_ws|elt|export_set|field|find_in_set|format|from_base64|hex|instr|lcase|left|length|load_file|locate|lower|lpad|ltrim|make_set|mid|oct|octet_length|ord|position|quote|reverse|right|rpad|rtrim|soundex|space|substr|substring|substring_index|to_base64|trim|ucase|unhex|upper|weight_string)(?=\s*\(|$)/,
	'string-functions.html#function_$1 -': /(insert|repeat|replace)(?=\s*\(|$)/,
	'vector-functions.html#function_$1 -': /(distance|string_to_vector|vector_dim|vector_to_string)(?=\s*\(|$)/,
	'window-function-descriptions.html#function_$1 $1/': /(cume_dist|dense_rank|last_value|ntile|percent_rank|rank|row_number)(?=\s*\(|$)/,
	'window-function-descriptions.html#function_$1 -': /(first_value|lag|lead|nth_value)(?=\s*\(|$)/,
	'xml-functions.html#function_$1 $1/': /(extractvalue|updatexml)(?=\s*\(|$)/,
	// end functions
	'row-subqueries.html': /(row)(?=\s*\(|$)/,
	'fulltext-search.html#function_match': /(match|against)(?=\s*\(|$)/,
}); // collisions: char, set, union(), allow parenthesis - IN, ANY, ALL, SOME, NOT, AND, OR, XOR

jush.build_links2('sqlset', 'https://dev.mysql.com/doc/mysql/en/$key', /(\b)/, /((?!-)\b)/gi, {
	'- aria-system-variables/#$1': /(aria_block_size|aria_checkpoint_interval|aria_checkpoint_log_activity|aria_encrypt_tables|aria_force_start_after_recovery_failures|aria_group_commit|aria_group_commit_interval|aria_log_dir_path|aria_log_file_size|aria_log_purge_type|aria_max_sort_file_size|aria_page_checksum|aria_pagecache_age_threshold|aria_pagecache_buffer_size|aria_pagecache_division_limit|aria_pagecache_file_hash_size|aria_pagecache_segments|aria_recover|aria_recover_options|aria_repair_threads|aria_sort_buffer_size|aria_stats_method|aria_sync_log_dir|aria_used_for_temp_tables)/,
	'- galera-cluster-system-variables/#$1': /(wsrep_OSU_method|wsrep_allowlist|wsrep_applier_retry_count|wsrep_auto_increment_control|wsrep_causal_reads|wsrep_certification_rules|wsrep_certify_nonPK|wsrep_cluster_address|wsrep_cluster_name|wsrep_convert_LOCK_to_trx|wsrep_data_home_dir|wsrep_dbug_option|wsrep_debug|wsrep_desync|wsrep_dirty_reads|wsrep_drupal_282555_workaround|wsrep_forced_binlog_format|wsrep_gtid_domain_id|wsrep_gtid_mode|wsrep_gtid_seq_no|wsrep_ignore_apply_errors|wsrep_load_data_splitting|wsrep_log_conflicts|wsrep_max_ws_rows|wsrep_max_ws_size|wsrep_mode|wsrep_mysql_replication_bundle|wsrep_node_address|wsrep_node_incoming_address|wsrep_node_name|wsrep_notify_cmd|wsrep_on|wsrep_patch_version|wsrep_provider|wsrep_provider_options|wsrep_recover|wsrep_reject_queries|wsrep_replicate_myisam|wsrep_retry_autocommit|wsrep_slave_FK_checks|wsrep_slave_UK_checks|wsrep_slave_threads|wsrep_sst_auth|wsrep_sst_donor|wsrep_sst_donor_rejects_queries|wsrep_sst_method|wsrep_sst_receive_address|wsrep_start_position|wsrep_status_file|wsrep_strict_ddl|wsrep_sync_wait|wsrep_thread_count)/,
	'- galera-cluster-system-variables/#$1_auth': /(wsrep_sr_store)/,
	'- innodb-system-variables/#$1': /(have_innodb|ignore_builtin_innodb|innodb_adaptive_checkpoint|innodb_adaptive_flushing_method|innodb_adaptive_hash_index_partitions|innodb_additional_mem_pool_size|innodb_alter_copy_bulk|innodb_api_bk_commit_interval|innodb_api_disable_rowlock|innodb_api_enable_binlog|innodb_api_enable_mdl|innodb_api_trx_level|innodb_background_scrub_data_check_interval|innodb_background_scrub_data_compressed|innodb_background_scrub_data_interval|innodb_background_scrub_data_uncompressed|innodb_blocking_buffer_pool_restore|innodb_buf_dump_status_frequency|innodb_buffer_pool_evict|innodb_buffer_pool_instances|innodb_buffer_pool_load_pages_abort|innodb_buffer_pool_populate|innodb_buffer_pool_restore_at_startup|innodb_buffer_pool_shm_checksum|innodb_buffer_pool_shm_key|innodb_buffer_pool_size_auto_min|innodb_buffer_pool_size_max|innodb_change_buffer_dump|innodb_change_buffering_debug|innodb_checkpoint_age_target|innodb_checksums|innodb_cleaner_lsn_age_factor|innodb_cmp_per_index_enabled|innodb_compression_algorithm|innodb_compression_default|innodb_compression_failure_threshold_pct|innodb_compression_level|innodb_compression_pad_pct_max|innodb_corrupt_table_action|innodb_data_file_buffering|innodb_data_file_write_through|innodb_deadlock_report|innodb_default_encryption_key_id|innodb_default_page_encryption_key|innodb_defragment|innodb_defragment_fill_factor|innodb_defragment_fill_factor_n_recs|innodb_defragment_frequency|innodb_defragment_n_pages|innodb_defragment_stats_accuracy|innodb_dict_size_limit|innodb_disallow_writes|innodb_doublewrite_file|innodb_empty_free_list_algorithm|innodb_enable_unsafe_group_commit|innodb_encrypt_log|innodb_encrypt_tables|innodb_encrypt_temporary_tables|innodb_encryption_rotate_key_age|innodb_encryption_rotation_iops|innodb_encryption_threads|innodb_extra_rsegments|innodb_extra_undoslots|innodb_fake_changes|innodb_fast_checksum|innodb_fatal_semaphore_wait_threshold|innodb_file_format|innodb_file_format_check|innodb_file_format_max|innodb_flush_neighbor_pages|innodb_force_primary_key|innodb_foreground_preflush|innodb_ibuf_accel_rate|innodb_ibuf_active_contract|innodb_ibuf_max_size|innodb_immediate_scrub_data_uncompressed|innodb_import_table_from_xtrabackup|innodb_instant_alter_column_allowed|innodb_instrument_semaphores|innodb_kill_idle_transaction|innodb_large_prefix|innodb_lazy_drop_table|innodb_lock_schedule_algorithm|innodb_locking_fake_changes|innodb_locks_unsafe_for_binlog|innodb_log_arch_dir|innodb_log_arch_expire_sec|innodb_log_archive|innodb_log_block_size|innodb_log_checksum_algorithm|innodb_log_file_buffering|innodb_log_file_mmap|innodb_log_file_size|innodb_log_file_write_through|innodb_log_files_in_group|innodb_log_optimize_ddl|innodb_log_spin_wait_delay|innodb_lru_flush_size|innodb_max_bitmap_file_size|innodb_max_changed_pages|innodb_max_purge_lag_wait|innodb_merge_sort_block_size|innodb_mirrored_log_groups|innodb_mtflush_threads|innodb_prefix_index_cluster_optimization|innodb_read_ahead|innodb_read_only|innodb_recovery_stats|innodb_safe_truncate|innodb_sched_priority_cleaner|innodb_scrub_log|innodb_scrub_log_interval|innodb_scrub_log_speed|innodb_show_verbose_locks|innodb_simulate_comp_failures|innodb_snapshot_isolation|innodb_stats_auto_update|innodb_stats_modified_counter|innodb_stats_sample_pages|innodb_stats_traditional|innodb_stats_update_need_lock|innodb_support_xa|innodb_thread_concurrency_timer_based|innodb_track_changed_pages|innodb_track_redo_log_now|innodb_truncate_temporary_tablespace_now|innodb_undo_logs|innodb_undo_tablespaces|innodb_use_atomic_writes|innodb_use_fallocate|innodb_use_global_flush_log_at_trx_commit|innodb_use_mtflush|innodb_use_purge_thread|innodb_use_stacktrace|innodb_use_sys_malloc|innodb_use_sys_stats_table|innodb_use_trim)/,
	'- myisam-system-variables/#$1': /(key_cache_file_hash_size|key_cache_segments|myisam_block_size|myisam_max_extra_sort_file_size|myisam_repair_threads)/,
	'- performance-schema-system-variables/#$1': /(performance_schema_max_prepared_statement_instances)/,
	'- replication-and-binary-log-system-variables/#$1': /(binlog_alter_two_phase|binlog_annotate_row_events|binlog_commit_wait_count|binlog_commit_wait_usec|binlog_do_db|binlog_file_cache_size|binlog_gtid_index|binlog_gtid_index_page_size|binlog_gtid_index_span_min|binlog_ignore_db|binlog_large_commit_threshold|binlog_legacy_event_pos|binlog_optimize_thread_scheduling|binlog_space_limit|create_tmp_table_binlog_formats|default_master_connection|expire_logs_days|master_info_file|replicate_annotate_row_events|replicate_do_db|replicate_do_table|replicate_events_marked_for_skip|replicate_ignore_db|replicate_ignore_table|replicate_rewrite_db|replicate_wild_do_table|replicate_wild_ignore_table|show_slave_auth_info|slave_abort_blocking_timeout|slave_connections_needed_for_purge|slave_ddl_exec_mode|slave_domain_parallel_threads|slave_run_triggers_for_rbr)/,
	'- server-system-variables/#$1': /(allow_suspicious_udfs|alter_algorithm|analyze_max_length|analyze_sample_percentage|character_set_collations|check_constraint_checks|date_format|datetime_format|debug_no_thread_alarm|default_regex_flags|default_table_type|encrypt_binlog|encrypt_tmp_disk_tables|encrypt_tmp_files|encryption_algorithm|enforce_storage_engine|engine_condition_pushdown|expensive_subquery_limit|have_crypt|have_csv|have_ndbcluster|have_partitioning|histogram_size|histogram_type|idle_readonly_transaction_timeout|idle_transaction_timeout|idle_write_transaction_timeout|ignore_db_dirs|in_predicate_conversion_threshold|in_transaction|join_buffer_space_limit|join_cache_level|language|legacy_xa_rollback_at_disconnect|log|log_disabled_statements|log_slow_disabled_statements|log_slow_filter|log_slow_min_examined_row_limit|log_slow_queries|log_slow_query|log_slow_query_file|log_slow_query_time|log_slow_rate_limit|log_slow_verbosity|log_tc_size|log_warnings|max_long_data_size|max_open_cursors|max_password_errors|max_recursive_iterations|max_rowid_filter_size|max_session_mem_used|max_statement_time|max_tmp_tables|max_tmp_total_space_usage|metadata_locks_cache_size|metadata_locks_hash_instances|metadata_locks_instances|mrr_buffer_size|multi_range_count|mysql56_temporal_format|old|old_mode|old_passwords|optimizer_extra_pruning_depth|optimizer_join_limit_pref_ratio|optimizer_max_sel_arg_weight|optimizer_max_sel_args|optimizer_record_context|optimizer_selectivity_sampling_limit|optimizer_use_condition_selectivity|plugin_maturity|progress_report_time|proxy_protocol_networks|query_cache_limit|query_cache_min_res_unit|query_cache_size|query_cache_strip_comments|query_cache_type|query_cache_wlock_invalidate|redirect_url|rowid_merge_buff_size|rpl_recovery_rank|safe_show_database|secure_auth|secure_timestamp|server_uid|show_old_temporals|skip_grant_tables|sql_big_tables|sql_if_exists|sql_log_update|sql_low_priority_updates|sql_max_join_size|standard_compliant_cte|storage_engine|strict_password_validation|sync_frm|table_lock_wait_timeout|table_type|tcp_keepalive_interval|tcp_keepalive_probes|tcp_keepalive_time|tcp_nodelay|thread_concurrency|timed_mutexes|tmp_disk_table_size|tmp_memory_table_size|tx_isolation|tx_read_only|use_stat_tables|version_malloc_library|version_source_revision)/,
	'- ssltls-system-variables/#$1': /(ssl_passphrase)/,
	'- vector-system-variables/#$1': /(mhnsw_default_distance|mhnsw_default_m|mhnsw_ef_search|mhnsw_max_cache_size)/,
	'innodb-parameters.html#option_mysqld_$1 -': /(innodb[-_]dedicated[-_]server)/,
	'innodb-parameters.html#sysvar_$1 -': /(enable_cascade_triggers|innodb_background_drop_list_empty|innodb_buffer_pool_debug|innodb_buffer_pool_in_core_file|innodb_checkpoint_disabled|innodb_compress_debug|innodb_ddl_buffer_size|innodb_ddl_log_crash_reset_debug|innodb_ddl_threads|innodb_directories|innodb_doublewrite_batch_size|innodb_doublewrite_dir|innodb_doublewrite_files|innodb_doublewrite_pages|innodb_extend_and_initialize|innodb_fsync_threshold|innodb_limit_optimistic_insert_debug|innodb_log_checkpoint_fuzzy_now|innodb_log_spin_cpu_abs_lwm|innodb_log_spin_cpu_pct_hwm|innodb_log_wait_for_flush_spin_hwm|innodb_log_writer_threads|innodb_merge_threshold_set_all_debug|innodb_native_foreign_keys|innodb_parallel_read_threads|innodb_print_ddl_logs|innodb_redo_log_archive_dirs|innodb_redo_log_capacity|innodb_redo_log_encrypt|innodb_segment_reserve_factor|innodb_spin_wait_pause_multiplier|innodb_stats_on_metadata|innodb_sync_debug|innodb_temp_tablespaces_dir|innodb_undo_log_encrypt|innodb_use_fdatasync|innodb_validate_tablespace_paths)/,
	'innodb-parameters.html#sysvar_$1 innodb-system-variables/#$1': /(innodb_adaptive_flushing|innodb_adaptive_flushing_lwm|innodb_adaptive_hash_index|innodb_adaptive_hash_index_parts|innodb_adaptive_max_sleep_delay|innodb_autoextend_increment|innodb_autoinc_lock_mode|innodb_buffer_pool_chunk_size|innodb_buffer_pool_dump_at_shutdown|innodb_buffer_pool_dump_now|innodb_buffer_pool_dump_pct|innodb_buffer_pool_filename|innodb_buffer_pool_load_abort|innodb_buffer_pool_load_at_startup|innodb_buffer_pool_load_now|innodb_buffer_pool_size|innodb_change_buffer_max_size|innodb_change_buffering|innodb_checksum_algorithm|innodb_commit_concurrency|innodb_concurrency_tickets|innodb_data_file_path|innodb_data_home_dir|innodb_deadlock_detect|innodb_default_row_format|innodb_disable_sort_file_cache|innodb_doublewrite|innodb_fast_shutdown|innodb_file_per_table|innodb_fill_factor|innodb_flush_log_at_timeout|innodb_flush_log_at_trx_commit|innodb_flush_method|innodb_flush_neighbors|innodb_flush_sync|innodb_flushing_avg_loops|innodb_force_load_corrupted|innodb_force_recovery|innodb_ft_aux_table|innodb_ft_cache_size|innodb_ft_enable_diag_print|innodb_ft_enable_stopword|innodb_ft_max_token_size|innodb_ft_min_token_size|innodb_ft_num_word_optimize|innodb_ft_result_cache_limit|innodb_ft_server_stopword_table|innodb_ft_sort_pll_degree|innodb_ft_total_cache_size|innodb_ft_user_stopword_table|innodb_idle_flush_pct|innodb_io_capacity|innodb_io_capacity_max|innodb_lock_wait_timeout|innodb_log_buffer_size|innodb_log_checkpoint_now|innodb_log_checksums|innodb_log_compressed_pages|innodb_log_group_home_dir|innodb_log_write_ahead_size|innodb_lru_scan_depth|innodb_max_dirty_pages_pct|innodb_max_dirty_pages_pct_lwm|innodb_max_purge_lag|innodb_max_purge_lag_delay|innodb_max_undo_log_size|innodb_monitor_disable|innodb_monitor_enable|innodb_monitor_reset|innodb_monitor_reset_all|innodb_numa_interleave|innodb_old_blocks_pct|innodb_old_blocks_time|innodb_online_alter_log_max_size|innodb_open_files|innodb_optimize_fulltext_only|innodb_page_cleaners|innodb_page_size|innodb_print_all_deadlocks|innodb_purge_batch_size|innodb_purge_rseg_truncate_frequency|innodb_purge_threads|innodb_random_read_ahead|innodb_read_ahead_threshold|innodb_read_io_threads|innodb_replication_delay|innodb_rollback_on_timeout|innodb_rollback_segments|innodb_sort_buffer_size|innodb_spin_wait_delay|innodb_stats_auto_recalc|innodb_stats_include_delete_marked|innodb_stats_method|innodb_stats_persistent|innodb_stats_persistent_sample_pages|innodb_stats_transient_sample_pages|innodb_status_output|innodb_status_output_locks|innodb_strict_mode|innodb_sync_array_size|innodb_table_locks|innodb_temp_data_file_path|innodb_thread_concurrency|innodb_thread_sleep_delay|innodb_tmpdir|innodb_undo_directory|innodb_undo_log_truncate|innodb_use_native_aio|innodb_version|innodb_write_io_threads)/,
	'innodb-parameters.html#sysvar_$1 innodb-system-variables/#innodb_support_xa': /(innodb_sync_spin_loops)/,
	'performance-schema-system-variables.html#sysvar_$1 -': /(performance_schema_error_size|performance_schema_max_digest_sample_age|performance_schema_max_logger_classes|performance_schema_max_meter_classes|performance_schema_max_metric_classes|performance_schema_max_prepared_statements_instances|performance_schema_show_processlist)/,
	'performance-schema-system-variables.html#sysvar_$1 performance-schema-system-variables/#$1': /(performance_schema|performance_schema_accounts_size|performance_schema_digests_size|performance_schema_events_stages_history_long_size|performance_schema_events_stages_history_size|performance_schema_events_statements_history_long_size|performance_schema_events_statements_history_size|performance_schema_events_transactions_history_long_size|performance_schema_events_transactions_history_size|performance_schema_events_waits_history_long_size|performance_schema_events_waits_history_size|performance_schema_hosts_size|performance_schema_max_cond_classes|performance_schema_max_cond_instances|performance_schema_max_digest_length|performance_schema_max_file_classes|performance_schema_max_file_handles|performance_schema_max_file_instances|performance_schema_max_index_stat|performance_schema_max_memory_classes|performance_schema_max_metadata_locks|performance_schema_max_mutex_classes|performance_schema_max_mutex_instances|performance_schema_max_program_instances|performance_schema_max_rwlock_classes|performance_schema_max_rwlock_instances|performance_schema_max_socket_classes|performance_schema_max_socket_instances|performance_schema_max_sql_text_length|performance_schema_max_stage_classes|performance_schema_max_statement_classes|performance_schema_max_statement_stack|performance_schema_max_table_handles|performance_schema_max_table_instances|performance_schema_max_table_lock_stat|performance_schema_max_thread_classes|performance_schema_max_thread_instances|performance_schema_session_connect_attrs_size|performance_schema_setup_actors_size|performance_schema_setup_objects_size)/,
	'performance-schema-system-variables.html#sysvar_$1 performance-schema-system-variables/#performance-schema-users-size': /(performance_schema_users_size)/,
	'replication-options-binary-log.html#option_mysqld_$1 -': /(log[-_]bin[-_]index)/,
	'replication-options-binary-log.html#option_mysqld_$1 replication-and-binary-log-system-variables/#$1': /(binlog[-_]row[-_]event[-_]max[-_]size)/,
	'replication-options-binary-log.html#sysvar_$1 -': /(binlog_encryption|binlog_error_action|binlog_expire_logs_auto_purge|binlog_group_commit_sync_delay|binlog_group_commit_sync_no_delay_count|binlog_max_flush_queue_time|binlog_order_commits|binlog_rotate_encryption_master_key_at_startup|binlog_row_value_options|binlog_rows_query_log_events|binlog_transaction_compression|binlog_transaction_compression_level_zstd|binlog_transaction_dependency_history_size|log_bin|log_bin_basename|log_bin_trust_function_creators|log_replica_updates|log_slave_updates|log_statements_unsafe_for_binlog|original_commit_timestamp|source_verify_checksum|sql_log_bin|sync_binlog)/,
	'replication-options-binary-log.html#sysvar_$1 replication-and-binary-log-system-variables/#$1': /(binlog_cache_size|binlog_checksum|binlog_direct_non_transactional_updates|binlog_expire_logs_seconds|binlog_format|binlog_row_image|binlog_row_metadata|binlog_stmt_cache_size|master_verify_checksum|max_binlog_cache_size|max_binlog_size|max_binlog_stmt_cache_size)/,
	'replication-options-gtids.html#sysvar_$1 -': /(enforce_gtid_consistency|gtid_executed|gtid_executed_compression_period|gtid_mode|gtid_next|gtid_owned|gtid_purged)/,
	'replication-options-replica.html#option_mysqld_$1 -': /(skip[-_]replica[-_]start|skip[-_]slave[-_]start|slave[-_]skip[-_]errors)/,
	'replication-options-replica.html#sysvar_$1 -': /(init_replica|init_slave|log_slow_replica_statements|log_slow_slave_statements|max_relay_log_size|relay_log|relay_log_basename|relay_log_index|relay_log_purge|relay_log_recovery|relay_log_space_limit|replica_allow_higher_version_source|replica_checkpoint_group|replica_checkpoint_period|replica_compressed_protocol|replica_exec_mode|replica_load_tmpdir|replica_max_allowed_packet|replica_net_timeout|replica_parallel_workers|replica_pending_jobs_size_max|replica_preserve_commit_order|replica_skip_errors|replica_sql_verify_checksum|replica_transaction_retries|replica_type_conversions|replication_optimize_for_static_plugin_config|replication_sender_observe_commit_only|rpl_read_size|rpl_semi_sync_replica_enabled|rpl_semi_sync_replica_trace_level|rpl_semi_sync_slave_enabled|rpl_semi_sync_slave_trace_level|rpl_stop_replica_timeout|rpl_stop_slave_timeout|slave_checkpoint_group|slave_checkpoint_period|slave_exec_mode|slave_load_tmpdir|slave_max_allowed_packet|slave_net_timeout|slave_parallel_workers|slave_pending_jobs_size_max|slave_preserve_commit_order|slave_sql_verify_checksum|slave_transaction_retries|slave_type_conversions|sql_replica_skip_counter|sql_slave_skip_counter|sync_master_info|sync_relay_log|sync_relay_log_info|sync_source_info|terminology_use_previous)/,
	'replication-options-replica.html#sysvar_$1 replication-and-binary-log-system-variables/#$1': /(report_host|report_password|report_port|report_user|slave_compressed_protocol)/,
	'replication-options-source.html#sysvar_$1 -': /(immediate_server_version|original_server_version|rpl_semi_sync_master_enabled|rpl_semi_sync_master_timeout|rpl_semi_sync_master_trace_level|rpl_semi_sync_master_wait_no_slave|rpl_semi_sync_source_enabled|rpl_semi_sync_source_timeout|rpl_semi_sync_source_trace_level|rpl_semi_sync_source_wait_for_replica_count|rpl_semi_sync_source_wait_no_replica|rpl_semi_sync_source_wait_point)/,
	'replication-options-source.html#sysvar_$1 replication-and-binary-log-system-variables/#$1': /(auto_increment_increment|auto_increment_offset)/,
	'replication-options.html#sysvar_$1 -': /(server_id|server_uuid)/,
	'server-options.html#option_mysqld_$1 -': /(log[-_]raw|transaction[-_]read[-_]only)/,
	'server-options.html#option_mysqld_$1 server-system-variables/#$1': /(debug|large[-_]pages|lc[-_]messages|lc[-_]messages[-_]dir|log[-_]error|port|skip[-_]show[-_]database|socket|sql[-_]mode|tmpdir|transaction[-_]isolation)/,
	'server-system-variables.html#sysvar_$1 -': /(activate_all_roles_on_login|activate_mandatory_roles|admin_address|admin_port|admin_ssl_ca|admin_ssl_capath|admin_ssl_cert|admin_ssl_cipher|admin_ssl_crl|admin_ssl_crlpath|admin_ssl_key|admin_tls_ciphersuites|admin_tls_version|authentication_openid_connect_configuration|authentication_policy|authentication_windows_log_level|authentication_windows_use_principal_name|auto_generate_certs|build_id|caching_sha2_password_auto_generate_rsa_keys|caching_sha2_password_digest_rounds|caching_sha2_password_enforce_storage_format|caching_sha2_password_private_key_path|caching_sha2_password_public_key_path|caching_sha2_password_storage_format|check_proxy_users|connection_memory_chunk_size|connection_memory_limit|connection_memory_status_limit|create_admin_listener_thread|cte_max_recursion_depth|default_collation_for_utf8mb4|default_table_encryption|disabled_storage_engines|enable_secondary_engine_statistics|end_markers_in_json|explain_format|explain_json_format_version|generated_random_password_length|global_connection_memory_limit|global_connection_memory_status_limit|global_connection_memory_tracking|have_statement_timeout|histogram_generation_max_mem_size|information_schema_stats_expiry|internal_tmp_mem_storage_engine|log_error_services|log_error_suppression_list|log_error_verbosity|log_slow_extra|log_throttle_queries_not_using_indexes|log_timestamps|mandatory_roles|max_execution_time|max_points_in_geometry|mecab_rc_file|min_examined_row_limit|named_pipe_full_access_group|ngram_token_size|object_policy_flush_interval_seconds|offline_mode|optimizer_trace_features|optimizer_trace_limit|optimizer_trace_offset|parser_max_mem_size|partial_revokes|password_history|password_require_current|password_reuse_interval|persist_only_admin_x509_subject|persist_sensitive_variables_in_plaintext|persisted_globals_load|print_identified_with_as_hex|protocol_compression_algorithms|pseudo_replica_mode|range_optimizer_max_mem_size|rbr_exec_mode|regexp_stack_limit|regexp_time_limit|require_row_format|restrict_fk_on_non_standard_key|resultset_metadata|schema_definition_cache|select_into_buffer_size|select_into_disk_sync|select_into_disk_sync_delay|session_track_gtids|set_operations_buffer_size|sha256_password_auto_generate_rsa_keys|sha256_password_private_key_path|sha256_password_proxy_users|sha256_password_public_key_path|show_create_table_verbosity|show_gipk_in_create_table_and_information_schema|sql_generate_invisible_primary_key|sql_require_primary_key|ssl_ca|ssl_capath|ssl_cert|ssl_cipher|ssl_crl|ssl_crlpath|ssl_fips_mode|ssl_key|ssl_session_cache_mode|ssl_session_cache_timeout|statement_id|stored_program_definition_cache|super_read_only|table_encryption_privilege_check|table_open_cache_triggers|tablespace_definition_cache|temptable_max_mmap|temptable_max_ram|thread_handling|thread_pool_algorithm|thread_pool_dedicated_listeners|thread_pool_high_priority_connection|thread_pool_longrun_trx_limit|thread_pool_max_active_query_threads|thread_pool_max_transactions_limit|thread_pool_max_unused_threads|thread_pool_prio_kickup_timer|thread_pool_query_threads_per_group|thread_pool_size|thread_pool_stall_limit|thread_pool_transaction_delay|tls_certificates_enforced_validation|tls_ciphersuites|version_compile_zlib|windowing_use_high_precision|xa_detach_on_prepare)/,
	'server-system-variables.html#sysvar_$1 myisam-system-variables/#$1': /(key_buffer_size|key_cache_age_threshold|key_cache_block_size|key_cache_division_limit|myisam_data_pointer_size|myisam_max_sort_file_size|myisam_mmap_size|myisam_recover_options|myisam_sort_buffer_size|myisam_stats_method|myisam_use_mmap)/,
	'server-system-variables.html#sysvar_$1 server-system-variables/#$1': /(autocommit|automatic_sp_privileges|back_log|basedir|big_tables|bind_address|block_encryption_mode|bulk_insert_buffer_size|character_set_client|character_set_connection|character_set_database|character_set_filesystem|character_set_results|character_set_server|character_set_system|character_sets_dir|collation_connection|collation_database|collation_server|completion_type|concurrent_insert|connect_timeout|core_file|datadir|debug_sync|default_password_lifetime|default_storage_engine|default_tmp_storage_engine|default_week_format|delay_key_write|delayed_insert_limit|delayed_insert_timeout|delayed_queue_size|disconnect_on_expired_password|div_precision_increment|eq_range_index_dive_limit|error_count|event_scheduler|explicit_defaults_for_timestamp|external_user|flush|flush_time|foreign_key_checks|ft_boolean_syntax|ft_max_word_len|ft_min_word_len|ft_query_expansion_limit|ft_stopword_file|general_log|general_log_file|group_concat_max_len|have_compress|have_dynamic_loading|have_geometry|have_profiling|have_query_cache|have_rtree_keys|have_symlink|host_cache_size|hostname|identity|init_connect|init_file|insert_id|interactive_timeout|join_buffer_size|keep_files_on_create|large_files_support|large_page_size|last_insert_id|lc_time_names|license|local_infile|lock_wait_timeout|locked_in_memory|log_output|log_queries_not_using_indexes|log_slow_admin_statements|long_query_time|low_priority_updates|lower_case_file_system|lower_case_table_names|max_allowed_packet|max_connect_errors|max_connections|max_delayed_threads|max_digest_length|max_error_count|max_heap_table_size|max_insert_delayed_threads|max_join_size|max_length_for_sort_data|max_prepared_stmt_count|max_seeks_for_key|max_sort_length|max_sp_recursion_depth|max_user_connections|max_write_lock_count|named_pipe|net_buffer_length|net_read_timeout|net_retry_count|net_write_timeout|old_alter_table|open_files_limit|optimizer_prune_level|optimizer_search_depth|optimizer_switch|optimizer_trace|optimizer_trace_max_mem_size|pid_file|plugin_dir|preload_buffer_size|profiling|profiling_history_size|protocol_version|proxy_user|pseudo_slave_mode|pseudo_thread_id|query_alloc_block_size|query_prealloc_size|rand_seed1|rand_seed2|range_alloc_block_size|read_buffer_size|read_only|read_rnd_buffer_size|require_secure_transport|secure_file_priv|session_track_schema|session_track_state_change|session_track_system_variables|session_track_transaction_info|shared_memory|shared_memory_base_name|skip_external_locking|skip_name_resolve|skip_networking|slow_launch_time|slow_query_log|slow_query_log_file|sort_buffer_size|sql_auto_is_null|sql_big_selects|sql_buffer_result|sql_log_off|sql_notes|sql_quote_show_create|sql_safe_updates|sql_select_limit|sql_warnings|stored_program_cache|system_time_zone|table_definition_cache|table_open_cache|table_open_cache_instances|thread_cache_size|thread_stack|time_zone|timestamp|tmp_table_size|transaction_alloc_block_size|transaction_prealloc_size|unique_checks|updatable_views_with_limit|version|version_comment|version_compile_machine|version_compile_os|wait_timeout|warning_count)/,
	'server-system-variables.html#sysvar_$1 ssltls-system-variables/#$1': /(tls_version)/,
});

jush.build_links2('sqlstatus', 'https://dev.mysql.com/doc/mysql/en/$key', /()/, /()/gi, {
	'server-status-variables.html#statvar_Com_xxx server-status-variables/#$1': /(Com_.+)/,
	'- aria-status-variables/#$1': /(aria_.+)/,
	'- galera-cluster-status-variables/#$1': /(wsrep_.+)/,
	'server-status-variables.html#statvar_$1 innodb-status-variables/#$1': /(Innodb_.+)/,
	'performance-schema-status-variables.html#statvar_$1 performance-schema-status-variables/#$1': /(Performance_schema_.+)/,
	'server-status-variables.html#statvar_$1 replication-and-binary-log-status-variables/#$1': /(Binlog_bytes_written|Binlog_cache_disk_use|Binlog_cache_use|Binlog_commits|Binlog_disk_use|Binlog_group_commit_trigger_timeout|Binlog_group_commits|Binlog_gtid_index_miss|Binlog_snapshot_file|Binlog_snapshot_position|Binlog_stmt_cache_disk_use|Binlog_stmt_cache_use|Master_gtid_wait_count|Master_gtid_wait_time|Master_gtid_wait_timeouts|Rpl_transactions_multi_engine|Slave_connections)/,
	'server-status-variables.html#statvar_$1 semisynchronous-replication-plugin-status-variables/#$1': /(Rpl_semi_sync_.+)/,
	'- thread-pool-system-status-variables/#$1': /(extra_.+)/,
	'server-status-variables.html#statvar_$1 server-status-variables/#$1': /(.+)/,
});
