MySQL 9.1.0
Source Code Documentation
|
Classes | |
class | ha_perfschema |
A handler for a PERFORMANCE_SCHEMA table. More... | |
class | PFS_internal_schema_access |
Implementation of internal ACL checks, for the performance schema. More... | |
class | PFS_engine_table |
An abstract PERFORMANCE_SCHEMA table. More... | |
struct | PFS_key_reader |
PFS_key_reader: Convert key into internal format. More... | |
class | PFS_engine_key |
class | PFS_engine_index_abstract |
class | PFS_engine_index |
struct | PFS_engine_table_share |
A PERFORMANCE_SCHEMA table share. More... | |
class | PFS_dynamic_table_shares |
A class to keep list of table shares for non-native performance schema tables i.e. More... | |
class | PFS_readonly_acl |
Privileges for read only tables. More... | |
class | PFS_truncatable_acl |
Privileges for truncatable tables. More... | |
class | PFS_updatable_acl |
Privileges for updatable tables. More... | |
class | PFS_editable_acl |
Privileges for editable tables. More... | |
class | PFS_unknown_acl |
Privileges for unknown tables. More... | |
class | PFS_readonly_world_acl |
Privileges for world readable tables. More... | |
class | PFS_truncatable_world_acl |
Privileges for world readable truncatable tables. More... | |
class | PFS_readonly_processlist_acl |
Privileges for readable processlist tables. More... | |
struct | PFS_simple_index |
Position of a cursor, for simple iterations. More... | |
struct | PFS_double_index |
Position of a double cursor, for iterations using 2 nested loops. More... | |
struct | PFS_triple_index |
Position of a triple cursor, for iterations using 3 nested loops. More... | |
Macros | |
#define | READ_INT_COMMON(DS, KT, DT, KORR) |
Typedefs | |
typedef PFS_engine_table *(* | pfs_open_table_t) (PFS_engine_table_share *) |
Callback to open a table. More... | |
typedef int(* | pfs_write_row_t) (PFS_engine_table *pfs_table, TABLE *table, unsigned char *buf, Field **fields) |
Callback to write a row. More... | |
typedef int(* | pfs_delete_all_rows_t) () |
Callback to delete all rows. More... | |
typedef ha_rows(* | pfs_get_row_count_t) () |
Callback to get a row count. More... | |
Functions | |
int | compare_table_names (const char *name1, const char *name2) |
static bool | allow_drop_schema_privilege () |
void | initialize_performance_schema_acl (bool bootstrap) |
Initialize the performance schema ACL. More... | |
static bool | allow_drop_table_privilege () |
void | PFS_dynamic_table_shares::init_mutex () |
void | PFS_dynamic_table_shares::destroy_mutex () |
static void | PFS_engine_table_share::get_all_tables (List< const Plugin_table > *tables) |
Get all the core performance schema tables. More... | |
static void | PFS_engine_table_share::init_all_locks () |
Initialize all the table share locks. More... | |
static void | PFS_engine_table_share::delete_all_locks () |
Delete all the table share locks. More... | |
ha_rows | PFS_engine_table_share::get_row_count () const |
Get the row count. More... | |
int | PFS_engine_table_share::write_row (PFS_engine_table *pfs_table, TABLE *table, unsigned char *buf, Field **fields) const |
Write a row. More... | |
static PFS_engine_table_share * | PFS_engine_table::find_engine_table_share (const char *name) |
Find a table share by name. More... | |
int | PFS_engine_table::read_row (TABLE *table, unsigned char *buf, Field **fields) |
Read a table row. More... | |
int | PFS_engine_table::update_row (TABLE *table, const unsigned char *old_buf, unsigned char *new_buf, Field **fields) |
Update a table row. More... | |
int | PFS_engine_table::delete_row (TABLE *table, const unsigned char *buf, Field **fields) |
Delete a row from this table. More... | |
virtual int | PFS_engine_table::delete_row_values (TABLE *table, const unsigned char *buf, Field **fields) |
Delete a row. More... | |
void | PFS_engine_table::get_position (void *ref) |
Get the position of the current row. More... | |
void | PFS_engine_table::set_position (const void *ref) |
Set the table cursor at a given position. More... | |
virtual int | PFS_engine_table::update_row_values (TABLE *table, const unsigned char *old_buf, unsigned char *new_buf, Field **fields) |
Update the current row values. More... | |
virtual int | PFS_engine_table::index_read (KEY *key_infos, uint index, const uchar *key, uint key_len, enum ha_rkey_function find_flag) |
Positions an index cursor to the index specified in the handle. More... | |
virtual int | PFS_engine_table::index_next_same (const uchar *key, uint key_len) |
Reads the next row matching the given key value. More... | |
PFS_engine_table_share * | PFS_dynamic_table_shares::find_share (const char *table_name, bool is_dead_too) |
Find a share in the list. More... | |
void | PFS_dynamic_table_shares::remove_share (PFS_engine_table_share *share) |
Remove a share from the list. More... | |
ACL_internal_access_result | PFS_internal_schema_access::check (Access_bitmask want_access, Access_bitmask *save_priv, bool any_combination_will_do) const override |
Check access to an internal schema. More... | |
const ACL_internal_table_access * | PFS_internal_schema_access::lookup (const char *name) const override |
Search for per table ACL access rules by table name. More... | |
ACL_internal_access_result | PFS_readonly_acl::check (Access_bitmask want_access, Access_bitmask *granted_access, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
ACL_internal_access_result | PFS_readonly_world_acl::check (Access_bitmask want_access, Access_bitmask *save_priv, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
ACL_internal_access_result | PFS_readonly_processlist_acl::check (Access_bitmask want_access, Access_bitmask *save_priv, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
ACL_internal_access_result | PFS_truncatable_acl::check (Access_bitmask want_access, Access_bitmask *granted_access, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
ACL_internal_access_result | PFS_truncatable_world_acl::check (Access_bitmask want_access, Access_bitmask *save_priv, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
ACL_internal_access_result | PFS_updatable_acl::check (Access_bitmask want_access, Access_bitmask *granted_access, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
ACL_internal_access_result | PFS_editable_acl::check (Access_bitmask want_access, Access_bitmask *granted_access, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
ACL_internal_access_result | PFS_unknown_acl::check (Access_bitmask want_access, Access_bitmask *granted_access, bool any_combination_will_do) const override |
Check access to an internal table. More... | |
enum ha_rkey_function | PFS_key_reader::read_int8 (enum ha_rkey_function find_flag, bool &isnull, char *value) |
enum ha_rkey_function | PFS_key_reader::read_uint8 (enum ha_rkey_function find_flag, bool &isnull, uchar *value) |
enum ha_rkey_function | PFS_key_reader::read_int16 (enum ha_rkey_function find_flag, bool &isnull, short *value) |
enum ha_rkey_function | PFS_key_reader::read_uint16 (enum ha_rkey_function find_flag, bool &isnull, ushort *value) |
enum ha_rkey_function | PFS_key_reader::read_int24 (enum ha_rkey_function find_flag, bool &isnull, long *value) |
enum ha_rkey_function | PFS_key_reader::read_uint24 (enum ha_rkey_function find_flag, bool &isnull, ulong *value) |
enum ha_rkey_function | PFS_key_reader::read_long (enum ha_rkey_function find_flag, bool &isnull, long *value) |
enum ha_rkey_function | PFS_key_reader::read_ulong (enum ha_rkey_function find_flag, bool &isnull, ulong *value) |
enum ha_rkey_function | PFS_key_reader::read_longlong (enum ha_rkey_function find_flag, bool &isnull, longlong *value) |
enum ha_rkey_function | PFS_key_reader::read_ulonglong (enum ha_rkey_function find_flag, bool &isnull, ulonglong *value) |
enum ha_rkey_function | PFS_key_reader::read_timestamp (enum ha_rkey_function find_flag, bool &isnull, ulonglong *value, uint dec) |
enum ha_rkey_function | PFS_key_reader::read_varchar_utf8 (enum ha_rkey_function find_flag, bool &isnull, char *buffer, uint *buffer_length, uint buffer_capacity) |
enum ha_rkey_function | PFS_key_reader::read_text_utf8 (enum ha_rkey_function find_flag, bool &isnull, char *buffer, uint *buffer_length, uint buffer_capacity) |
void | PFS_engine_index::read_key (const uchar *key, uint key_len, enum ha_rkey_function find_flag) override |
#define READ_INT_COMMON | ( | DS, | |
KT, | |||
DT, | |||
KORR | |||
) |
typedef int(* pfs_delete_all_rows_t) () |
Callback to delete all rows.
typedef ha_rows(* pfs_get_row_count_t) () |
Callback to get a row count.
typedef PFS_engine_table *(* pfs_open_table_t) (PFS_engine_table_share *) |
Callback to open a table.
typedef int(* pfs_write_row_t) (PFS_engine_table *pfs_table, TABLE *table, unsigned char *buf, Field **fields) |
Callback to write a row.
|
static |
|
static |
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Implements ACL_internal_table_access.
Reimplemented in PFS_readonly_world_acl, and PFS_readonly_processlist_acl.
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Implements ACL_internal_table_access.
Reimplemented in PFS_truncatable_world_acl.
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Implements ACL_internal_table_access.
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Implements ACL_internal_table_access.
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Implements ACL_internal_table_access.
|
overridevirtual |
Check access to an internal schema.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Implements ACL_internal_schema_access.
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Reimplemented from PFS_readonly_acl.
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Reimplemented from PFS_truncatable_acl.
|
overridevirtual |
Check access to an internal table.
When a privilege is granted, this method add the requested privilege to save_priv.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
any_combination_will_do | true if it's enough to have any privilege for any combination of the table columns. |
ACL_INTERNAL_ACCESS_GRANTED | All the requested privileges are granted, and saved in save_priv. |
ACL_INTERNAL_ACCESS_DENIED | At least one of the requested privileges was denied. |
ACL_INTERNAL_ACCESS_CHECK_GRANT | No requested privilege was denied, and grant should be checked for at least one privilege. Requested privileges that are granted, if any, are saved in save_priv. |
Reimplemented from PFS_readonly_acl.
int compare_table_names | ( | const char * | name1, |
const char * | name2 | ||
) |
|
static |
Delete all the table share locks.
Delete a row from this table.
table | Table handle |
buf | the row buffer to delete |
fields | Table fields |
|
protectedvirtual |
Delete a row.
table | Table handle |
buf | Row buffer |
fields | Table fields |
Reimplemented in table_plugin_table, table_setup_actors, and table_setup_objects.
void PFS_dynamic_table_shares::destroy_mutex | ( | ) |
|
static |
Find a table share by name.
name | The table name |
PFS_engine_table_share * PFS_dynamic_table_shares::find_share | ( | const char * | table_name, |
bool | is_dead_too | ||
) |
Find a share in the list.
table_name | name of the table |
is_dead_too | if true, consider tables marked to be deleted |
|
static |
Get all the core performance schema tables.
void PFS_engine_table::get_position | ( | void * | ref | ) |
Get the position of the current row.
[out] | ref | position |
ha_rows PFS_engine_table_share::get_row_count | ( | ) | const |
Get the row count.
|
virtual |
Reads the next row matching the given key value.
|
virtual |
Positions an index cursor to the index specified in the handle.
Fetches the row if any.
|
static |
Initialize all the table share locks.
void PFS_dynamic_table_shares::init_mutex | ( | ) |
void initialize_performance_schema_acl | ( | bool | bootstrap | ) |
Initialize the performance schema ACL.
ACL is strictly enforced when the server is running in normal mode, to enforce that only legal operations are allowed. When running in bootstrap mode, ACL restrictions are relaxed, to allow the bootstrap scripts to DROP / CREATE performance schema tables.
bootstrap | True if the server is starting in bootstrap mode. |
|
overridevirtual |
Search for per table ACL access rules by table name.
name | the table name |
Implements ACL_internal_schema_access.
enum ha_rkey_function PFS_key_reader::read_int16 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
short * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_int24 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
long * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_int8 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
char * | value | ||
) |
|
overridevirtual |
Implements PFS_engine_index_abstract.
enum ha_rkey_function PFS_key_reader::read_long | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
long * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_longlong | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
longlong * | value | ||
) |
Read a table row.
table | Table handle |
buf | Row buffer |
fields | Table fields |
enum ha_rkey_function PFS_key_reader::read_text_utf8 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
char * | buffer, | ||
uint * | buffer_length, | ||
uint | buffer_capacity | ||
) |
enum ha_rkey_function PFS_key_reader::read_timestamp | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
ulonglong * | value, | ||
uint | dec | ||
) |
enum ha_rkey_function PFS_key_reader::read_uint16 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
ushort * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_uint24 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
ulong * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_uint8 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
uchar * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_ulong | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
ulong * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_ulonglong | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
ulonglong * | value | ||
) |
enum ha_rkey_function PFS_key_reader::read_varchar_utf8 | ( | enum ha_rkey_function | find_flag, |
bool & | isnull, | ||
char * | buffer, | ||
uint * | buffer_length, | ||
uint | buffer_capacity | ||
) |
void PFS_dynamic_table_shares::remove_share | ( | PFS_engine_table_share * | share | ) |
Remove a share from the list.
share | share to be removed |
void PFS_engine_table::set_position | ( | const void * | ref | ) |
Set the table cursor at a given position.
[in] | ref | position |
int PFS_engine_table::update_row | ( | TABLE * | table, |
const unsigned char * | old_buf, | ||
unsigned char * | new_buf, | ||
Field ** | fields | ||
) |
Update a table row.
table | Table handle |
old_buf | old row buffer |
new_buf | new row buffer |
fields | Table fields |
|
protectedvirtual |
Update the current row values.
table | Table handle |
old_buf | old row buffer |
new_buf | new row buffer |
fields | Table fields |
Reimplemented in table_plugin_table, table_setup_actors, table_setup_consumers, table_setup_instruments, table_setup_loggers, table_setup_meters, table_setup_objects, table_setup_threads, and table_threads.
int PFS_engine_table_share::write_row | ( | PFS_engine_table * | pfs_table, |
TABLE * | table, | ||
unsigned char * | buf, | ||
Field ** | fields | ||
) | const |
Write a row.
|
static |
|
static |
|
static |
PFS_editable_acl pfs_editable_acl |
Singleton instance of PFS_editable_acl.
|
extern |
Singleton instance of PFS_editable_acl.
|
extern |
Name of the performance schema engine.
PFS_dynamic_table_shares pfs_external_table_shares |
|
extern |
PFS_internal_schema_access pfs_internal_access |
PFS_readonly_acl pfs_readonly_acl |
Singleton instance of PFS_readonly_acl.
|
extern |
Singleton instance of PFS_readonly_acl.
PFS_readonly_processlist_acl pfs_readonly_processlist_acl |
Singleton instance of PFS_readonly_processlist_acl.
|
extern |
Singleton instance of PFS_readonly_processlist_acl.
PFS_readonly_world_acl pfs_readonly_world_acl |
Singleton instance of PFS_readonly_world_acl.
|
extern |
Singleton instance of PFS_readonly_world_acl.
PFS_truncatable_acl pfs_truncatable_acl |
Singleton instance of PFS_truncatable_acl.
|
extern |
Singleton instance of PFS_truncatable_acl.
PFS_truncatable_world_acl pfs_truncatable_world_acl |
Singleton instance of PFS_readonly_world_acl.
|
extern |
Singleton instance of PFS_readonly_world_acl.
PFS_unknown_acl pfs_unknown_acl |
Singleton instance of PFS_unknown_acl.
|
extern |
Singleton instance of PFS_unknown_acl.
PFS_updatable_acl pfs_updatable_acl |
Singleton instance of PFS_updatable_acl.
|
extern |
Singleton instance of PFS_updatable_acl.