diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-03-21 12:59:40 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-03-23 00:55:19 +0100 |
commit | b6e2973ee66bad2e998cd2acd2c47fecaa1e6942 (patch) | |
tree | 0d19bca6e63eee7949e6b4a663f615e11d27b6d0 /plugin | |
parent | f5b2761c701fa971f0455c05f757c3a147632056 (diff) | |
download | mariadb-git-b6e2973ee66bad2e998cd2acd2c47fecaa1e6942.tar.gz |
MDEV-14533 Provide information_schema tables using which hardware information can be obtained.
update README, use maria_declare_plugin(), specify the author.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/disks/CMakeLists.txt (renamed from plugin/information_schema_disks/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | plugin/disks/README.txt (renamed from plugin/information_schema_disks/README.txt) | 25 | ||||
-rw-r--r-- | plugin/disks/information_schema_disks.cc (renamed from plugin/information_schema_disks/information_schema_disks.cc) | 13 |
3 files changed, 12 insertions, 26 deletions
diff --git a/plugin/information_schema_disks/CMakeLists.txt b/plugin/disks/CMakeLists.txt index a0ed929c62c..a0ed929c62c 100644 --- a/plugin/information_schema_disks/CMakeLists.txt +++ b/plugin/disks/CMakeLists.txt diff --git a/plugin/information_schema_disks/README.txt b/plugin/disks/README.txt index 1c9b8fb6283..b49db3c03b5 100644 --- a/plugin/information_schema_disks/README.txt +++ b/plugin/disks/README.txt @@ -57,31 +57,16 @@ tables; disks and mounts. ... -Building --------- -- Ensure that the directory information_schema_disks is in the top-level - directory of the server. -- Add - - ADD_SUBDIRECTORY(information_schema_disks) - - to the top-level CMakeLists.txt - -> Invoke make - - $ make - Installation ------------ -- Copy information_schema_disks/libinformation_schema_disks.so to the plugin - directory of the server: - $ cd information_schema_disks - $ sudo cp libinformation_schema_disks.so plugin-directory-of-server +- Use "install plugin" or "install soname" command: + + MariaDB [(none)]> install plugin disks soname 'disks.so'; -- Using mysql, install the plugin: + or - MariaDB [(none)]> install plugin disks soname 'libinformation_schema_disks.so'; + MariaDB [(none)]> install soname 'disks.so'; Usage ----- diff --git a/plugin/information_schema_disks/information_schema_disks.cc b/plugin/disks/information_schema_disks.cc index b5e3a6dc728..122b3d3f17f 100644 --- a/plugin/information_schema_disks/information_schema_disks.cc +++ b/plugin/disks/information_schema_disks.cc @@ -19,7 +19,8 @@ #include <mntent.h> #include <sql_class.h> #include <table.h> -#include <innodb_priv.h> + +bool schema_table_store_record(THD *thd, TABLE *table); namespace { @@ -133,21 +134,21 @@ int disks_table_init(void *ptr) extern "C" { -mysql_declare_plugin(disks_library) +maria_declare_plugin(disks) { MYSQL_INFORMATION_SCHEMA_PLUGIN, &disks_table_info, /* type-specific descriptor */ "DISKS", /* table name */ - "MariaDB", /* author */ + "Johan Wikman", /* author */ "Disk space information", /* description */ PLUGIN_LICENSE_GPL, /* license type */ disks_table_init, /* init function */ - NULL, + NULL, /* deinit function */ 0x0100, /* version = 1.0 */ NULL, /* no status variables */ NULL, /* no system variables */ - NULL, /* no reserved information */ - 0 /* no flags */ + "1.0", /* String version representation */ + MariaDB_PLUGIN_MATURITY_BETA /* Maturity (see include/mysql/plugin.h)*/ } mysql_declare_plugin_end; |