From 9f1a1411a3f26e008fbc4912c55afcd65e14f79e Mon Sep 17 00:00:00 2001 From: Nathan Liefting Date: Mon, 9 Aug 2021 17:20:27 +0200 Subject: [PATCH] Update mysql_zbx_part.pl --- mysql_zbx_part.pl | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/mysql_zbx_part.pl b/mysql_zbx_part.pl index bfb609f..58fff7e 100755 --- a/mysql_zbx_part.pl +++ b/mysql_zbx_part.pl @@ -81,24 +81,24 @@ sub check_have_partition { # End of Mysql 5.5 # MySQL 5.6 + MariaDB -# my $sth = $dbh->prepare(qq{SELECT plugin_status FROM information_schema.plugins WHERE plugin_name = 'partition'}); -# -# $sth->execute(); -# -# my $row = $sth->fetchrow_array(); -# -# $sth->finish(); -# return 1 if $row eq 'ACTIVE'; -# -# End of MySQL 5.6 + MariaDB + my $sth = $dbh->prepare(qq{SELECT plugin_status FROM information_schema.plugins WHERE plugin_name = 'partition'}); -# MySQL 8.x (NOT MariaDB!) - my $sth = $dbh->prepare(qq{select version();}); $sth->execute(); + my $row = $sth->fetchrow_array(); - + $sth->finish(); - return 1 if $row >= 8; + return 1 if $row eq 'ACTIVE'; + +# End of MySQL 5.6 + MariaDB + +# MySQL 8.x (NOT MariaDB!) +# my $sth = $dbh->prepare(qq{select version();}); +# $sth->execute(); +# my $row = $sth->fetchrow_array(); + +# $sth->finish(); +# return 1 if $row >= 8; # # End of MySQL 8.x