Note
This view is introduced since OceanBase Database V4.2.2.
Purpose
The mysql.procs_priv view stores the information about permissions for stored procedures and functions.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| Host | varchar(60) | No | The name of the host. |
| Db | varchar(64) | No | The name of the database. |
| User | varchar(32) | No | The username of the permission grantee. |
| Routine_name | varchar(64) | No | The name of the routine. |
| Routine_type | varchar(9) | No | The type of the routine. |
| Grantor | varchar(93) | Yes | The username of the permission grantor. |
| Proc_priv | varchar(27) | No | The granted permission. |
| Timestamp | date | Yes | The time when the permission was granted. |
Example
obclient [mysql]> SELECT * FROM mysql.procs_priv LIMIT 1;
The query result is as follows:
+------+---------+------+-------------------+--------------+---------+-----------------------+------------+
| Host | Db | User | Routine_name | Routine_type | Grantor | Proc_priv | Timestamp |
+------+---------+------+-------------------+--------------+---------+-----------------------+------------+
| % | test_db | root | pro_generate_data | PROCEDURE | root@% | Execute,Alter Routine | 2023-12-21 |
+------+---------+------+-------------------+--------------+---------+-----------------------+------------+
1 row in set (0.032 sec)