UDF 相关语句 #
语法 | 描述 | 类型 |
---|---|---|
SHOW ENCRYPT UDF_ENABLED | 查询加密 UDF 启用状态 | RQL |
SET ENCRYPT UDF_ENABLED = true/false | 设置加密 UDF 启用状态 | RDL |
SHOW ENCRYPT PROCEDURES | 查询加密相关存储过程 | RQL |
SHOW ENCRYPT PROCEDURE procedureName | 查询指定的加密存储过程 | RQL |
SHOW ENCRYPT TABLE PROCEDURE tableName | 查询指定表关联的加密存储过程 | RQL |
SHOW ENCRYPT TABLE UDF tableName | 查询指定表关联的 UDF | RQL |
1. 查询加密 UDF 启用状态 #
SHOW ENCRYPT UDF_ENABLED
示例
mysql> SHOW ENCRYPT UDF_ENABLED;
+-------------+
| udf_enabled |
+-------------+
| false |
+-------------+
1 row in set (0.04 sec)
2. 设置加密 UDF 启用状态 #
SET ENCRYPT UDF_ENABLED = true | false
示例
mysql> SET ENCRYPT UDF_ENABLED = true;
Query OK, 0 rows affected (0.12 sec)
3. 查询加密相关存储过程 #
SHOW ENCRYPT PROCEDURES
示例
mysql> SHOW ENCRYPT PROCEDURES;
+----------+----------------------------+----------------------------+--------------------+
| type | logic_name | actual_name | referenced_objects |
+----------+----------------------------+----------------------------+--------------------+
| FUNCTION | LOGMNR$TAB_GG_TABF_PUBLIC | LOGMNR$TAB_GG_TABF_PUBLIC | |
| FUNCTION | LOGMNR$KEY_GG_TABF_PUBLIC | LOGMNR$KEY_GG_TABF_PUBLIC | |
| FUNCTION | LOGMNR$SEQ_GG_TABF_PUBLIC | LOGMNR$SEQ_GG_TABF_PUBLIC | |
| FUNCTION | LOGMNR$GSBA_GG_TABF_PUBLIC | LOGMNR$GSBA_GG_TABF_PUBLIC | |
| FUNCTION | LOGMNR$COL_GG_TABF_PUBLIC | LOGMNR$COL_GG_TABF_PUBLIC | |
| FUNCTION | LOGMNR$USER_GG_TABF_PUBLIC | LOGMNR$USER_GG_TABF_PUBLIC | |
+----------+----------------------------+----------------------------+--------------------+
6 rows in set (0.01 sec)
4. 查询指定的加密存储过程 #
SHOW ENCRYPT PROCEDURE procedureName
示例
mysql> SHOW ENCRYPT PROCEDURE LOGMNR$TAB_GG_TABF_PUBLIC;
+----------+---------------------------+---------------------------+--------------------+
| type | logic_name | actual_name | referenced_objects |
+----------+---------------------------+---------------------------+--------------------+
| FUNCTION | LOGMNR$TAB_GG_TABF_PUBLIC | LOGMNR$TAB_GG_TABF_PUBLIC | |
+----------+---------------------------+---------------------------+--------------------+
1 row in set (0.02 sec)
5. 查询指定表关联的加密存储过程 #
SHOW ENCRYPT TABLE PROCEDURE tableName
示例
mysql> SHOW ENCRYPT TABLE PROCEDURE t_encrypt;
Empty set (0.08 sec)
6. 查询指定表关联的 UDF #
SHOW ENCRYPT TABLE UDF tableName
示例
mysql> SHOW ENCRYPT TABLE UDF t_encrypt;
+------------+-------------+--------------------------------+--------------------------------+-------------------------+---------------------+
| table_name | column_name | cipher_encryptor_name | cipher_decryptor_name | assisted_encryptor_name | like_encryptor_name |
+------------+-------------+--------------------------------+--------------------------------+-------------------------+---------------------+
| t_encrypt | order_id | SPEX_4YQXJZAYBS9GY3MD3U67R5ZS0 | SPEX_1H0NN0Y8XWOWCQN4G5M8HBC2Y | NULL | NULL |
| t_encrypt | user_id | SPEX_7MD3WMJE438VCSXYM7ZCYWQBC | SPEX_21XX6GRE4GA4O6W6NQU4IRVQ6 | NULL | NULL |
+------------+-------------+--------------------------------+--------------------------------+-------------------------+---------------------+
2 rows in set (0.13 sec)