Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory
mytop
mytop_five_o.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mytop_five_o.patch of Package mytop
Index: mytop-1.6/mytop =================================================================== --- mytop-1.6.orig/mytop +++ mytop-1.6/mytop @@ -262,18 +262,21 @@ ReadMode($RM_RESET) unless $config{batch ## Get static data -my $db_version; my $have_query_cache; -my @variables = Hashes("show variables"); +my @ver = Hashes("select version() as ver"); +my $db_version = $ver[0]->{ver}; +my $global = ''; + +if ($db_version =~ /^5/) +{ + $global = 'global'; +} + +my @variables = Hashes("show $global variables"); foreach (@variables) { - if ($_->{Variable_name} eq "version") - { - $db_version = $_->{Value}; - next; - } if ($_->{Variable_name} eq "have_query_cache") { if ($_->{Value} eq 'YES') @@ -710,7 +713,7 @@ sub GetData() ## if ($config{header}) { - my @recs = Hashes("show status"); + my @recs = Hashes("show $global status"); ## if the server died or we lost connectivity if (not @recs)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor