Note
- In OceanBase Database V4.3.x, this view is introduced since V4.3.1.
- In OceanBase Database V4.2.x, this view is introduced since V4.2.2.
Purpose
The mysql.procs_priv view displays information about privileges on stored procedures and stored 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 user to which privileges are granted. |
| 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 grantor that grants the privileges. |
| Proc_priv | varchar(27) | NO | The privileges granted. |
| Timestamp | date | YES | The time when the privileges were granted. |
Sample query
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)