mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-14533 Provide information_schema tables using which hardware
information can be obtained. disks.test moved to plugin's directory.
This commit is contained in:
14
plugin/disks/mysql-test/disks/disks.result
Normal file
14
plugin/disks/mysql-test/disks/disks.result
Normal file
@ -0,0 +1,14 @@
|
||||
install plugin DISKS soname 'disks';
|
||||
show create table information_schema.disks;
|
||||
Table Create Table
|
||||
DISKS CREATE TEMPORARY TABLE `DISKS` (
|
||||
`Disk` varchar(4096) NOT NULL DEFAULT '',
|
||||
`Path` varchar(4096) NOT NULL DEFAULT '',
|
||||
`Total` int(32) NOT NULL DEFAULT '0',
|
||||
`Used` int(32) NOT NULL DEFAULT '0',
|
||||
`Available` int(32) NOT NULL DEFAULT '0'
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
||||
select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
||||
sum(Total) > sum(Available) sum(Total)>sum(Used)
|
||||
1 1
|
||||
uninstall plugin DISKS;
|
11
plugin/disks/mysql-test/disks/disks.test
Normal file
11
plugin/disks/mysql-test/disks/disks.test
Normal file
@ -0,0 +1,11 @@
|
||||
--source include/not_windows.inc
|
||||
|
||||
if (!$DISKS_SO) {
|
||||
skip No DISKS plugin;
|
||||
}
|
||||
|
||||
install plugin DISKS soname 'disks';
|
||||
show create table information_schema.disks;
|
||||
select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
||||
|
||||
uninstall plugin DISKS;
|
1
plugin/disks/mysql-test/disks/suite.opt
Normal file
1
plugin/disks/mysql-test/disks/suite.opt
Normal file
@ -0,0 +1 @@
|
||||
--plugin-load-add=$DISKS_SO
|
10
plugin/disks/mysql-test/disks/suite.pm
Normal file
10
plugin/disks/mysql-test/disks/suite.pm
Normal file
@ -0,0 +1,10 @@
|
||||
package My::Suite::Disks;
|
||||
|
||||
@ISA = qw(My::Suite);
|
||||
|
||||
return "No Disks plugin" unless $ENV{DISKS_SO};
|
||||
|
||||
sub is_default { 1 }
|
||||
|
||||
bless { };
|
||||
|
Reference in New Issue
Block a user