Skip to content

Commit

Permalink
Update mysql_zbx_part.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
larcorba authored Aug 9, 2021
1 parent 724a694 commit 9f1a141
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions mysql_zbx_part.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9f1a141

Please sign in to comment.