MySQL 5.6.14 Source Code Document
|
Classes | |
class | ha_perfschema |
class | PFS_check_intact |
class | PFS_internal_schema_access |
class | PFS_engine_table |
struct | PFS_engine_table_share |
class | PFS_readonly_acl |
class | PFS_truncatable_acl |
class | PFS_updatable_acl |
class | PFS_editable_acl |
class | PFS_unknown_acl |
struct | PFS_simple_index |
struct | PFS_double_index |
struct | PFS_triple_index |
Typedefs | |
typedef PFS_engine_table *(* | pfs_open_table_t )(void) |
typedef int(* | pfs_write_row_t )(TABLE *table, unsigned char *buf, Field **fields) |
typedef int(* | pfs_delete_all_rows_t )(void) |
typedef ha_rows(* | pfs_get_row_count_t )(void) |
Functions | |
void | initialize_performance_schema_acl (bool bootstrap) |
bool | pfs_show_status (handlerton *hton, THD *thd, stat_print_fn *print, enum ha_stat_type stat) |
static void | PFS_engine_table_share::check_all_tables (THD *thd) |
virtual void | PFS_check_intact::report_error (uint code, const char *fmt,...) |
void | PFS_engine_table_share::check_one_table (THD *thd) |
static void | PFS_engine_table_share::init_all_locks (void) |
static void | PFS_engine_table_share::delete_all_locks (void) |
ha_rows | PFS_engine_table_share::get_row_count (void) const |
int | PFS_engine_table_share::write_row (TABLE *table, unsigned char *buf, Field **fields) const |
static const PFS_engine_table_share * | PFS_engine_table::find_engine_table_share (const char *name) |
int | PFS_engine_table::read_row (TABLE *table, unsigned char *buf, Field **fields) |
int | PFS_engine_table::update_row (TABLE *table, const unsigned char *old_buf, unsigned char *new_buf, Field **fields) |
int | PFS_engine_table::delete_row (TABLE *table, const unsigned char *buf, Field **fields) |
virtual int | PFS_engine_table::delete_row_values (TABLE *table, const unsigned char *buf, Field **fields) |
void | PFS_engine_table::get_position (void *ref) |
void | PFS_engine_table::set_position (const void *ref) |
void | PFS_engine_table::get_normalizer (PFS_instr_class *instr_class) |
static void | PFS_engine_table::set_field_ulong (Field *f, ulong value) |
static void | PFS_engine_table::set_field_ulonglong (Field *f, ulonglong value) |
static void | PFS_engine_table::set_field_char_utf8 (Field *f, const char *str, uint len) |
static void | PFS_engine_table::set_field_varchar_utf8 (Field *f, const char *str, uint len) |
static void | PFS_engine_table::set_field_longtext_utf8 (Field *f, const char *str, uint len) |
static void | PFS_engine_table::set_field_enum (Field *f, ulonglong value) |
static void | PFS_engine_table::set_field_timestamp (Field *f, ulonglong value) |
static ulonglong | PFS_engine_table::get_field_enum (Field *f) |
static String * | PFS_engine_table::get_field_char_utf8 (Field *f, String *val) |
static String * | PFS_engine_table::get_field_varchar_utf8 (Field *f, String *val) |
virtual int | PFS_engine_table::update_row_values (TABLE *table, const unsigned char *old_buf, unsigned char *new_buf, Field **fields) |
ACL_internal_access_result | PFS_internal_schema_access::check (ulong want_access, ulong *save_priv) const |
const ACL_internal_table_access * | PFS_internal_schema_access::lookup (const char *name) const |
virtual ACL_internal_access_result | PFS_readonly_acl::check (ulong want_access, ulong *save_priv) const |
ACL_internal_access_result | PFS_truncatable_acl::check (ulong want_access, ulong *save_priv) const |
ACL_internal_access_result | PFS_updatable_acl::check (ulong want_access, ulong *save_priv) const |
ACL_internal_access_result | PFS_editable_acl::check (ulong want_access, ulong *save_priv) const |
ACL_internal_access_result | PFS_unknown_acl::check (ulong want_access, ulong *save_priv) const |
typedef int(* pfs_delete_all_rows_t)(void) |
Callback to delete all rows.
Definition at line 205 of file pfs_engine_table.h.
typedef ha_rows(* pfs_get_row_count_t)(void) |
Callback to get a row count.
Definition at line 207 of file pfs_engine_table.h.
typedef PFS_engine_table*(* pfs_open_table_t)(void) |
Callback to open a table.
Definition at line 200 of file pfs_engine_table.h.
Callback to write a row.
Definition at line 202 of file pfs_engine_table.h.
|
virtual |
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 |
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.
Definition at line 631 of file pfs_engine_table.cc.
|
virtual |
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 |
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.
Definition at line 646 of file pfs_engine_table.cc.
|
virtual |
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 |
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.
Definition at line 661 of file pfs_engine_table.cc.
|
virtual |
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 |
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.
Definition at line 676 of file pfs_engine_table.cc.
|
virtual |
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 |
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.
Definition at line 690 of file pfs_engine_table.cc.
|
virtual |
Check access to an internal schema.
want_access | the privileges requested | |
[in,out] | save_priv | the privileges granted |
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.
Definition at line 578 of file pfs_engine_table.cc.
|
static |
Check all the tables structure.
thd | current thread |
Definition at line 158 of file pfs_engine_table.cc.
void PFS_engine_table_share::check_one_table | ( | THD * | thd | ) |
Check integrity of the actual table schema. The actual table schema (.frm) is compared to the expected schema.
thd | current thread |
Definition at line 208 of file pfs_engine_table.cc.
|
static |
Delete all the table share locks.
Definition at line 249 of file pfs_engine_table.cc.
Delete a row from this table.
table | Table handle |
buf | the row buffer to delete |
fields | Table fields |
Definition at line 412 of file pfs_engine_table.cc.
|
protectedvirtual |
Delete a row.
table | Table handle |
buf | Row buffer |
fields | Table fields |
Reimplemented in table_setup_objects, and table_setup_actors.
Definition at line 435 of file pfs_engine_table.cc.
|
static |
Find a table share by name.
name | The table name |
Definition at line 320 of file pfs_engine_table.cc.
Helper, read a value from a char utf8 field.
f | the field to read | |
[out] | val | the field value |
Definition at line 536 of file pfs_engine_table.cc.
|
static |
Helper, read a value from an enum field.
f | the field to read |
Definition at line 528 of file pfs_engine_table.cc.
Helper, read a value from a varchar utf8 field.
f | the field to read | |
[out] | val | the field value |
Definition at line 545 of file pfs_engine_table.cc.
void PFS_engine_table::get_normalizer | ( | PFS_instr_class * | instr_class | ) |
Get the normalizer and class type for the current row.
Get the timer normalizer and class type for the current row.
[in] | instr_class | class |
Definition at line 464 of file pfs_engine_table.cc.
void PFS_engine_table::get_position | ( | void * | ref | ) |
Get the position of the current row.
[out] | ref | position |
Definition at line 446 of file pfs_engine_table.cc.
ha_rows PFS_engine_table_share::get_row_count | ( | void | ) | const |
Get the row count.
Definition at line 257 of file pfs_engine_table.cc.
|
static |
Initialize all the table share locks.
Definition at line 240 of file pfs_engine_table.cc.
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 boostrap mode, ACL restrictions are relaxed, to allow the boostrap scripts to DROP / CREATE performance schema tables.
bootstrap | True if the server is starting in bootstrap mode. |
Definition at line 615 of file pfs_engine_table.cc.
|
virtual |
Search for per table ACL access rules by table name.
name | the table name |
Implements ACL_internal_schema_access.
Definition at line 597 of file pfs_engine_table.cc.
bool pfs_show_status | ( | handlerton * | hton, |
THD * | thd, | ||
stat_print_fn * | print, | ||
enum ha_stat_type | stat | ||
) |
SHOW ENGINE PERFORMANCE_SCHEMA STATUS.
hton | Storage engine handler |
thd | Current thread |
Print function | |
stat | status to show |
Definition at line 719 of file pfs_engine_table.cc.
Read a table row.
table | Table handle |
buf | Row buffer |
fields | Table fields |
Definition at line 342 of file pfs_engine_table.cc.
|
static |
Helper, assign a value to a char utf8 field.
f | the field to set |
str | the string to assign |
len | the length of the string to assign |
Definition at line 487 of file pfs_engine_table.cc.
|
static |
Helper, assign a value to an enum field.
f | the field to set |
value | the value to assign |
Definition at line 511 of file pfs_engine_table.cc.
|
static |
Helper, assign a value to a longtext utf8 field.
f | the field to set |
str | the string to assign |
len | the length of the string to assign |
Definition at line 503 of file pfs_engine_table.cc.
|
static |
Helper, assign a value to a timestamp field.
f | the field to set |
value | the value to assign |
Definition at line 518 of file pfs_engine_table.cc.
|
static |
Helper, assign a value to a ulong field.
f | the field to set |
value | the value to assign |
Definition at line 473 of file pfs_engine_table.cc.
|
static |
Helper, assign a value to a ulonglong field.
f | the field to set |
value | the value to assign |
Definition at line 480 of file pfs_engine_table.cc.
|
static |
Helper, assign a value to a varchar utf8 field.
f | the field to set |
str | the string to assign |
len | the length of the string to assign |
Definition at line 495 of file pfs_engine_table.cc.
void PFS_engine_table::set_position | ( | const void * | ref | ) |
Set the table cursor at a given position.
[in] | ref | position |
Definition at line 455 of file pfs_engine_table.cc.
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 |
Definition at line 388 of file pfs_engine_table.cc.
|
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_setup_instruments, table_threads, table_setup_objects, table_setup_actors, table_setup_consumers, and table_setup_timers.
Definition at line 553 of file pfs_engine_table.cc.
Write a row.
Definition at line 266 of file pfs_engine_table.cc.
PFS_editable_acl pfs_editable_acl |
Singleton instance of PFS_editable_acl.
Definition at line 673 of file pfs_engine_table.cc.
PFS_editable_acl pfs_editable_acl |
Singleton instance of PFS_editable_acl.
Definition at line 673 of file pfs_engine_table.cc.
const char* pfs_engine_name |
Name of the performance schema engine.
Definition at line 177 of file ha_perfschema.cc.
PFS_readonly_acl pfs_readonly_acl |
Singleton instance of PFS_readonly_acl.
Definition at line 628 of file pfs_engine_table.cc.
PFS_readonly_acl pfs_readonly_acl |
Singleton instance of PFS_readonly_acl.
Definition at line 628 of file pfs_engine_table.cc.
PFS_truncatable_acl pfs_truncatable_acl |
Singleton instance of PFS_truncatable_acl.
Definition at line 643 of file pfs_engine_table.cc.
PFS_truncatable_acl pfs_truncatable_acl |
Singleton instance of PFS_truncatable_acl.
Definition at line 643 of file pfs_engine_table.cc.
PFS_unknown_acl pfs_unknown_acl |
Singleton instance of PFS_unknown_acl.
Definition at line 687 of file pfs_engine_table.cc.
PFS_unknown_acl pfs_unknown_acl |
Singleton instance of PFS_unknown_acl.
Definition at line 687 of file pfs_engine_table.cc.
PFS_updatable_acl pfs_updatable_acl |
Singleton instance of PFS_updatable_acl.
Definition at line 658 of file pfs_engine_table.cc.
PFS_updatable_acl pfs_updatable_acl |
Singleton instance of PFS_updatable_acl.
Definition at line 658 of file pfs_engine_table.cc.