Updated the fles in /lib to use the new VersionParser

This commit is contained in:
Brian Fraser
2012-07-11 15:10:33 -03:00
parent acd5281e3c
commit f30c50be44
5 changed files with 17 additions and 36 deletions

View File

@@ -279,8 +279,7 @@ sub get_connected_slaves {
# user with USER(), quote it, and then add it to statement.
my $show = "SHOW GRANTS FOR ";
my $user = 'CURRENT_USER()';
my $vp = $self->{VersionParser};
if ( $vp && !$vp->version_ge($dbh, '4.1.2') ) {
if ( VersionParser->new($dbh) < '4.1.2' ) {
$user = $dbh->selectrow_arrayref('SELECT USER()')->[0];
$user =~ s/([^@]+)@(.+)/'$1'\@'$2'/;
}