summaryrefslogtreecommitdiffstats
path: root/plugin/userstat/userstat.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /plugin/userstat/userstat.cc
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugin/userstat/userstat.cc')
-rw-r--r--plugin/userstat/userstat.cc82
1 files changed, 82 insertions, 0 deletions
diff --git a/plugin/userstat/userstat.cc b/plugin/userstat/userstat.cc
new file mode 100644
index 00000000..2084453f
--- /dev/null
+++ b/plugin/userstat/userstat.cc
@@ -0,0 +1,82 @@
+#include <my_global.h>
+#include <mysql/plugin.h>
+#include <mysql_version.h>
+#include "table.h"
+#include "sql_connect.h"
+#include "field.h"
+#include "sql_const.h"
+#include "sql_acl.h"
+
+bool schema_table_store_record(THD *thd, TABLE *table);
+
+#include "client_stats.cc"
+#include "index_stats.cc"
+#include "table_stats.cc"
+#include "user_stats.cc"
+
+static struct st_mysql_information_schema userstat_info=
+{ MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
+
+maria_declare_plugin(userstat)
+{
+ MYSQL_INFORMATION_SCHEMA_PLUGIN,
+ &userstat_info,
+ "CLIENT_STATISTICS",
+ "Percona and Sergei Golubchik",
+ "Client Statistics",
+ PLUGIN_LICENSE_GPL,
+ client_stats_init,
+ 0,
+ 0x0200,
+ NULL,
+ NULL,
+ "2.0",
+ MariaDB_PLUGIN_MATURITY_STABLE
+},
+{
+ MYSQL_INFORMATION_SCHEMA_PLUGIN,
+ &userstat_info,
+ "INDEX_STATISTICS",
+ "Percona and Sergei Golubchik",
+ "Index Statistics",
+ PLUGIN_LICENSE_GPL,
+ index_stats_init,
+ 0,
+ 0x0200,
+ NULL,
+ NULL,
+ "2.0",
+ MariaDB_PLUGIN_MATURITY_STABLE
+},
+{
+ MYSQL_INFORMATION_SCHEMA_PLUGIN,
+ &userstat_info,
+ "TABLE_STATISTICS",
+ "Percona and Sergei Golubchik",
+ "Table Statistics",
+ PLUGIN_LICENSE_GPL,
+ table_stats_init,
+ 0,
+ 0x0200,
+ NULL,
+ NULL,
+ "2.0",
+ MariaDB_PLUGIN_MATURITY_STABLE
+},
+{
+ MYSQL_INFORMATION_SCHEMA_PLUGIN,
+ &userstat_info,
+ "USER_STATISTICS",
+ "Percona and Sergei Golubchik",
+ "User Statistics",
+ PLUGIN_LICENSE_GPL,
+ user_stats_init,
+ 0,
+ 0x0200,
+ NULL,
+ NULL,
+ "2.0",
+ MariaDB_PLUGIN_MATURITY_STABLE
+}
+maria_declare_plugin_end;
+