summaryrefslogtreecommitdiff
path: root/storage/perfschema/pfs_engine_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/perfschema/pfs_engine_table.h')
-rw-r--r--storage/perfschema/pfs_engine_table.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h
index 925a2186a92..6280a3799b3 100644
--- a/storage/perfschema/pfs_engine_table.h
+++ b/storage/perfschema/pfs_engine_table.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -286,6 +286,11 @@ typedef int (*pfs_delete_all_rows_t)(void);
/** Callback to get a row count. */
typedef ha_rows (*pfs_get_row_count_t)(void);
+struct PFS_engine_table_share_state {
+ /** Schema integrity flag. */
+ bool m_checked;
+};
+
/**
A PERFORMANCE_SCHEMA table share.
This data is shared by all the table handles opened on the same table.
@@ -319,6 +324,10 @@ struct PFS_engine_table_share
LEX_STRING sql;
/** Table is available even if the Performance Schema is disabled. */
bool m_perpetual;
+ /** Table is optional. */
+ bool m_optional;
+ /** Dynamic state. */
+ PFS_engine_table_share_state *m_state;
};
/**
@@ -354,7 +363,7 @@ public:
~PFS_truncatable_acl()
{}
- ACL_internal_access_result check(privilege_t want_access,
+ virtual ACL_internal_access_result check(privilege_t want_access,
privilege_t *save_priv) const;
};
@@ -459,6 +468,25 @@ public:
extern PFS_truncatable_world_acl pfs_truncatable_world_acl;
+/**
+ Privileges for readable processlist tables.
+*/
+class PFS_readonly_processlist_acl : public PFS_readonly_acl {
+ public:
+ PFS_readonly_processlist_acl()
+ {}
+
+ ~PFS_readonly_processlist_acl()
+ {}
+
+ virtual ACL_internal_access_result check(privilege_t want_access,
+ privilege_t *save_priv) const;
+};
+
+/** Singleton instance of PFS_readonly_processlist_acl */
+extern PFS_readonly_processlist_acl pfs_readonly_processlist_acl;
+
+
/** Position of a cursor, for simple iterations. */
struct PFS_simple_index
{