Commit b6e2973e authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-14533 Provide information_schema tables using which hardware information can be obtained.

update README, use maria_declare_plugin(), specify the author.
parent f5b2761c
...@@ -57,31 +57,16 @@ tables; disks and mounts. ...@@ -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 Installation
------------ ------------
- Copy information_schema_disks/libinformation_schema_disks.so to the plugin
directory of the server:
$ cd information_schema_disks - Use "install plugin" or "install soname" command:
$ sudo cp libinformation_schema_disks.so plugin-directory-of-server
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 Usage
----- -----
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
#include <mntent.h> #include <mntent.h>
#include <sql_class.h> #include <sql_class.h>
#include <table.h> #include <table.h>
#include <innodb_priv.h>
bool schema_table_store_record(THD *thd, TABLE *table);
namespace namespace
{ {
...@@ -133,21 +134,21 @@ int disks_table_init(void *ptr) ...@@ -133,21 +134,21 @@ int disks_table_init(void *ptr)
extern "C" extern "C"
{ {
mysql_declare_plugin(disks_library) maria_declare_plugin(disks)
{ {
MYSQL_INFORMATION_SCHEMA_PLUGIN, MYSQL_INFORMATION_SCHEMA_PLUGIN,
&disks_table_info, /* type-specific descriptor */ &disks_table_info, /* type-specific descriptor */
"DISKS", /* table name */ "DISKS", /* table name */
"MariaDB", /* author */ "Johan Wikman", /* author */
"Disk space information", /* description */ "Disk space information", /* description */
PLUGIN_LICENSE_GPL, /* license type */ PLUGIN_LICENSE_GPL, /* license type */
disks_table_init, /* init function */ disks_table_init, /* init function */
NULL, NULL, /* deinit function */
0x0100, /* version = 1.0 */ 0x0100, /* version = 1.0 */
NULL, /* no status variables */ NULL, /* no status variables */
NULL, /* no system variables */ NULL, /* no system variables */
NULL, /* no reserved information */ "1.0", /* String version representation */
0 /* no flags */ MariaDB_PLUGIN_MATURITY_BETA /* Maturity (see include/mysql/plugin.h)*/
} }
mysql_declare_plugin_end; mysql_declare_plugin_end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment