## 12.2 可加载函数参考

[](<>)

下表列出了在运行时可加载的每个函数，并提供了每个函数的简短描述。有关列出内置函数和运算符的表，请参阅[第 12.1 节，“内置函数和运算符参考”](built-in-function-reference.html)

有关可加载函数的一般信息，请参阅[第 5.7 节，“MySQL 服务器可加载函数”](server-loadable-functions.html).

[](<>)

**表 12.2 可加载函数**

| 姓名 | 描述 | 介绍 | 已弃用 |
| --- | --- | --- | --- |
| [`非对称解密（）`](enterprise-encryption-functions.html#function_asymmetric-decrypt) | 使用私钥或公钥解密密文 |  |  |
| [`非对称派生（）`](enterprise-encryption-functions.html#function_asymmetric-derive) | 从非对称密钥派生对称密钥 |  |  |
| [`非对称加密（）`](enterprise-encryption-functions.html#function_asymmetric-encrypt) | 使用私钥或公钥加密明文 |  |  |
| [`不对称符号（）`](enterprise-encryption-functions.html#function_asymmetric-sign) | 从摘要生成签名 |  |  |
| [`非对称验证（）`](enterprise-encryption-functions.html#function_asymmetric-verify) | 验证签名与摘要匹配 |  |  |
| [`asynchronous_connection_failover_add_managed()`](replication-functions-source-list.html#function_asynchronous-connection-failover-add-managed) | 将托管组中的复制源服务器添加到源列表 | 8.0.23 |  |
| [`asynchronous_connection_failover_add_source()`](replication-functions-source-list.html#function_asynchronous-connection-failover-add-source) | 将复制源服务器添加到源列表 | 8.0.22 |  |
| [`asynchronous_connection_failover_delete_managed()`](replication-functions-source-list.html#function_asynchronous-connection-failover-delete-managed) | 从源列表中删除受管理的复制源服务器组 | 8.0.23 |  |
| [`asynchronous_connection_failover_delete_source()`](replication-functions-source-list.html#function_asynchronous-connection-failover-delete-source) | 从源列表中删除复制源服务器 | 8.0.22 |  |
| [`audit_api_message_emit_udf()`](audit-api-message-emit.html#function_audit-api-message-emit-udf) | 将消息事件添加到审核日志 |  |  |
| [`audit_log_encryption_password_get()`](audit-log-reference.html#function_audit-log-encryption-password-get) | 获取审计日志加密密码 |  |  |
| [`audit_log_encryption_password_set()`](audit-log-reference.html#function_audit-log-encryption-password-set) | 设置审计日志加密密码 |  |  |
| [`audit_log_filter_flush()`](audit-log-reference.html#function_audit-log-filter-flush) | 刷新审计日志过滤表 |  |  |
| [`audit_log_filter_remove_filter()`](audit-log-reference.html#function_audit-log-filter-remove-filter) | 删除审核日志过滤器 |  |  |
| [`audit_log_filter_remove_user()`](audit-log-reference.html#function_audit-log-filter-remove-user) | 取消分配用户的审核日志过滤器 |  |  |
| [`audit_log_filter_set_filter()`](audit-log-reference.html#function_audit-log-filter-set-filter) | 定义审计日志过滤器 |  |  |
| [`audit_log_filter_set_user()`](audit-log-reference.html#function_audit-log-filter-set-user) | 将审核日志过滤器分配给用户 |  |  |
| [`审计日志读取（）`](audit-log-reference.html#function_audit-log-read) | 返回审核日志记录 |  |  |
| [`audit_log_read_bookmark()`](audit-log-reference.html#function_audit-log-read-bookmark) | 最近审核日志事件的书签 |  |  |
| [`create_asymmetric_priv_key()`](enterprise-encryption-functions.html#function_create-asymmetric-priv-key) | 创建私钥 |  |  |
| [`create_asymmetric_pub_key()`](enterprise-encryption-functions.html#function_create-asymmetric-pub-key) | 创建公钥 |  |  |
| [`create_dh_parameters()`](enterprise-encryption-functions.html#function_create-dh-parameters) | 生成共享 DH 秘密 |  |  |
| [`create_digest()`](enterprise-encryption-functions.html#function_create-digest) | 从字符串生成摘要 |  |  |
| [`firewall_group_delist()`](firewall-reference.html#function_firewall-group-delist) | 从防火墙组配置文件中删除帐户 | 8.0.23 |  |
| [`firewall_group_enlist()`](firewall-reference.html#function_firewall-group-enlist) | 将帐户添加到防火墙组配置文件 | 8.0.23 |  |
| [`gen_blacklist()`](data-masking-functions.html#function_gen-blacklist) | 执行字典术语替换 |  | 8.0.23 |
| [`gen_blocklist()`](data-masking-functions.html#function_gen-blocklist) | 执行字典术语替换 | 8.0.23 |  |
| [`gen_dictionary()`](data-masking-functions.html#function_gen-dictionary) | 从字典中返回随机词 |  |  |
| [`gen_dictionary_drop()`](data-masking-functions.html#function_gen-dictionary-drop) | 从注册表中删除字典 |  |  |
| [`gen_dictionary_load()`](data-masking-functions.html#function_gen-dictionary-load) | 将字典加载到注册表中 |  |  |
| [`gen_range()`](data-masking-functions.html#function_gen-range) | 生成范围内的随机数 |  |  |
| [`gen_rnd_email()`](data-masking-functions.html#function_gen-rnd-email) | 生成随机电子邮件地址 |  |  |
| [`gen_rnd_pan()`](data-masking-functions.html#function_gen-rnd-pan) | 生成随机支付卡主账号 |  |  |
| [`gen_rnd_ssn()`](data-masking-functions.html#function_gen-rnd-ssn) | 生成随机的美国社会安全号码 |  |  |
| [`gen_rnd_us_phone()`](data-masking-functions.html#function_gen-rnd-us-phone) | 生成随机美国电话号码 |  |  |
| [`group_replication_disable_member_action()`](group-replication-functions-for-member-actions.html#function_group-replication-disable-member-action) | 启用成员操作，以便成员在指定情况下不采取它 |  |  |
| [`group_replication_enable_member_action()`](group-replication-functions-for-member-actions.html#function_group-replication-enable-member-action) | 允许成员在指定情况下采取的成员操作 |  |  |
| [`group_replication_get_communication_protocol()`](group-replication-functions-for-communication-protocol.html#function_group-replication-get-communication-protocol) | 返回组复制协议版本 |  |  |
| [`group_replication_get_write_concurrency()`](group-replication-functions-for-maximum-consensus.html#function_group-replication-get-write-concurrency) | 返回并行可执行的最大共识实例数 |  |  |
| [`group_replication_reset_member_actions()`](group-replication-functions-for-member-actions.html#function_group-replication-reset-member-actions) | 将成员操作配置重置为默认设置 |  |  |
| [`group_replication_set_as_primary()`](group-replication-functions-for-new-primary.html#function_group-replication-set-as-primary) | 将组成员分配为新的主要成员 |  |  |
| [`group_replication_set_communication_protocol()`](group-replication-functions-for-communication-protocol.html#function_group-replication-set-communication-protocol) | 设置组复制协议版本 |  |  |
| [`group_replication_set_write_concurrency()`](group-replication-functions-for-maximum-consensus.html#function_group-replication-set-write-concurrency) | 设置可并行执行的最大共识实例数 |  |  |
| [`group_replication_switch_to_multi_primary_mode()`](group-replication-functions-for-mode.html#function_group-replication-switch-to-multi-primary-mode) | 将组从单主模式更改为多主模式 |  |  |
| [`group_replication_switch_to_single_primary_mode()`](group-replication-functions-for-mode.html#function_group-replication-switch-to-single-primary-mode) | 将组从多主模式更改为单主模式 |  |  |
| [`keyring_aws_rotate_cmk()`](keyring-functions-plugin-specific.html#function_keyring-aws-rotate-cmk) | 轮换 AWS 客户主密钥 |  |  |
| [`keyring_aws_rotate_keys()`](keyring-functions-plugin-specific.html#function_keyring-aws-rotate-keys) | 旋转钥匙圈中的钥匙\_aws 存储文件 |  |  |
| [`keyring_hashicorp_update_config()`](keyring-functions-plugin-specific.html#function_keyring-hashicorp-update-config) | 导致运行时密钥环\_哈希公司重组 |  |  |
| [`keyring_key_fetch()`](keyring-functions-general-purpose.html#function_keyring-key-fetch) | 获取密钥环键值 |  |  |
| [`keyring_key_generate()`](keyring-functions-general-purpose.html#function_keyring-key-generate) | 生成随机密钥环密钥 |  |  |
| [`keyring_key_length_fetch()`](keyring-functions-general-purpose.html#function_keyring-key-length-fetch) | 返回密钥环密钥长度 |  |  |
| [`keyring_key_remove()`](keyring-functions-general-purpose.html#function_keyring-key-remove) | 删除密钥环密钥 |  |  |
| [`keyring_key_store()`](keyring-functions-general-purpose.html#function_keyring-key-store) | 将密钥存储在密钥环中 |  |  |
| [`keyring_key_type_fetch()`](keyring-functions-general-purpose.html#function_keyring-key-type-fetch) | 返回密钥环密钥类型 |  |  |
| [`load_rewrite_rules()`](rewriter-query-rewrite-plugin-reference.html#function_load-rewrite-rules) | 重写器插件助手例程 |  |  |
| [`mask_inner()`](data-masking-functions.html#function_mask-inner) | 掩盖字符串的内部部分 |  |  |
| [`mask_outer()`](data-masking-functions.html#function_mask-outer) | 屏蔽字符串的左右部分 |  |  |
| [`掩码盘（）`](data-masking-functions.html#function_mask-pan) | 屏蔽支付卡主帐号字符串部分 |  |  |
| [`mask_pan_relaxed()`](data-masking-functions.html#function_mask-pan-relaxed) | 屏蔽支付卡主帐号字符串部分 |  |  |
| [`mask_ssn()`](data-masking-functions.html#function_mask-ssn) | 掩盖美国社会安全号码 |  |  |
| [`mysql_firewall_flush_status()`](firewall-reference.html#function_mysql-firewall-flush-status) | 重置防火墙状态变量 |  |  |
| [`mysql_query_attribute_string()`](query-attributes.html#function_mysql-query-attribute-string) | 获取查询属性值 | 8.0.23 |  |
| [`normalize_statement()`](firewall-reference.html#function_normalize-statement) | 将 SQL 语句规范化为摘要形式 |  |  |
| [`read_firewall_group_allowlist()`](firewall-reference.html#function_read-firewall-group-allowlist) | 更新防火墙组配置文件记录语句缓存 | 8.0.23 |  |
| [`read_firewall_groups()`](firewall-reference.html#function_read-firewall-groups) | 更新防火墙组配置文件缓存 | 8.0.23 |  |
| [`read_firewall_users()`](firewall-reference.html#function_read-firewall-users) | 更新防火墙帐户配置文件缓存 |  | 8.0.26 |
| [`read_firewall_whitelist()`](firewall-reference.html#function_read-firewall-whitelist) | 更新防火墙帐户配置文件记录语句缓存 |  | 8.0.26 |
| [`service_get_read_locks()`](locking-service.html#function_service-get-read-locks) | 获取锁服务共享锁 |  |  |
| [`service_get_write_locks()`](locking-service.html#function_service-get-write-locks) | 获取锁服务排他锁 |  |  |
| [`service_release_locks()`](locking-service.html#function_service-release-locks) | 释放锁定服务锁 |  |  |
| [`set_firewall_group_mode()`](firewall-reference.html#function_set-firewall-group-mode) | 建立防火墙组配置文件操作模式 | 8.0.23 |  |
| [`set_firewall_mode()`](firewall-reference.html#function_set-firewall-mode) | 建立防火墙帐户配置文件操作模式 |  | 8.0.26 |
| [`version_tokens_delete()`](version-tokens-reference.html#function_version-tokens-delete) | 从版本令牌列表中删除令牌 |  |  |
| [`version_tokens_edit()`](version-tokens-reference.html#function_version-tokens-edit) | 修改版本令牌列表 |  |  |
| [`version_tokens_lock_exclusive()`](version-tokens-reference.html#function_version-tokens-lock-exclusive) | 获取版本令牌的排他锁 |  |  |
| [`version_tokens_lock_shared()`](version-tokens-reference.html#function_version-tokens-lock-shared) | 获取版本令牌上的共享锁 |  |  |
| [`version_tokens_set()`](version-tokens-reference.html#function_version-tokens-set) | 设置版本令牌列表 |  |  |
| [`version_tokens_show()`](version-tokens-reference.html#function_version-tokens-show) | 返回版本令牌列表 |  |  |
| [`version_tokens_unlock()`](version-tokens-reference.html#function_version-tokens-unlock) | 发布版本令牌锁 |  |  |
