mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-14533 Provide information_schema tables using which hardware information can be obtained.
update README, use maria_declare_plugin(), specify the author.
This commit is contained in:
parent
f5b2761c70
commit
b6e2973ee6
3 changed files with 12 additions and 26 deletions
|
@ -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:
|
||||
|
||||
- Using mysql, install the plugin:
|
||||
MariaDB [(none)]> install plugin disks soname 'disks.so';
|
||||
|
||||
MariaDB [(none)]> install plugin disks soname 'libinformation_schema_disks.so';
|
||||
or
|
||||
|
||||
MariaDB [(none)]> install soname 'disks.so';
|
||||
|
||||
Usage
|
||||
-----
|
|
@ -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;
|
||||
|
Loading…
Reference in a new issue