summaryrefslogtreecommitdiff
path: root/storage/perfschema/pfs_user.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-12-10 15:35:00 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-10 19:24:22 +0100
commit0ea717f51a152afdb3791195c4a25ee0baa2faac (patch)
tree0eb10fc1413d1583ffdec2c18a66491d7befeec2 /storage/perfschema/pfs_user.h
parentdfe6e914e58472159f34a8a4c9288ff61eac479f (diff)
downloadmariadb-git-0ea717f51a152afdb3791195c4a25ee0baa2faac.tar.gz
P_S 5.7.28
Diffstat (limited to 'storage/perfschema/pfs_user.h')
-rw-r--r--storage/perfschema/pfs_user.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/storage/perfschema/pfs_user.h b/storage/perfschema/pfs_user.h
index 3d0457eae59..9553ff8cae7 100644
--- a/storage/perfschema/pfs_user.h
+++ b/storage/perfschema/pfs_user.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
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,
@@ -40,6 +40,7 @@ struct PFS_thread;
@{
*/
+/** Hash key for a user. */
struct PFS_user_key
{
/**
@@ -51,6 +52,7 @@ struct PFS_user_key
uint m_key_length;
};
+/** Per user statistics. */
struct PFS_ALIGNED PFS_user : public PFS_connection_slice
{
public:
@@ -74,13 +76,18 @@ public:
PFS_atomic::add_32(& m_refcount, -1);
}
- void aggregate(void);
+ void aggregate(bool alive);
void aggregate_waits(void);
void aggregate_stages(void);
void aggregate_statements(void);
+ void aggregate_transactions(void);
+ void aggregate_memory(bool alive);
+ void aggregate_status(void);
void aggregate_stats(void);
void release(void);
+ void carry_memory_stat_delta(PFS_memory_stat_delta *delta, uint index);
+
/** Internal lock. */
pfs_lock m_lock;
PFS_user_key m_key;
@@ -95,7 +102,7 @@ private:
int init_user(const PFS_global_param *param);
void cleanup_user(void);
-int init_user_hash(void);
+int init_user_hash(const PFS_global_param *param);
void cleanup_user_hash(void);
PFS_user *
@@ -106,14 +113,7 @@ PFS_user *sanitize_user(PFS_user *unsafe);
void purge_all_user(void);
-/* For iterators and show status. */
-
-extern ulong user_max;
-extern ulong user_lost;
-
-/* Exposing the data directly, for iterators. */
-
-extern PFS_user *user_array;
+/* For show status. */
extern LF_HASH user_hash;