Skip to content

Instantly share code, notes, and snippets.

@hirose31
Created April 28, 2022 07:37
Show Gist options
  • Save hirose31/4c06143cb61b83bd77c445ba24abe782 to your computer and use it in GitHub Desktop.
Save hirose31/4c06143cb61b83bd77c445ba24abe782 to your computer and use it in GitHub Desktop.
# https://twitter.com/hirose31/status/1519559294546747392?s=20&t=23VtFa6D63RSB3Go2boDYw
sub mysql_clientversion {
require DBD::mysql;
no warnings qw(redefine);
local *DBD::mysql::db::_login = sub { 1 };
my $dbh = DBI->connect('dbi:mysql:');
return $dbh->{mysql_clientversion};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment