diff --git a/libraries/advisor.class.php b/libraries/advisor.class.php index 4273fcca86..df7178e4fe 100644 --- a/libraries/advisor.class.php +++ b/libraries/advisor.class.php @@ -21,6 +21,12 @@ class Advisor PMA_DBI_fetch_result('SHOW GLOBAL STATUS', 0, 1), PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES', 0, 1) ); + // Add total memory to variables as well + require_once('libraries/sysinfo.lib.php'); + $sysinfo = getSysInfo(); + $memory = $sysinfo->memory(); + $this->variables['system_memory'] = $memory['MemTotal']; + // Step 2: Read and parse the list of rules $this->parseResult = $this->parseRulesFile(); // Step 3: Feed the variables to the rules and let them fire. Sets $runResult diff --git a/libraries/advisory_rules.txt b/libraries/advisory_rules.txt index e4b94eba5a..dbfa6f0fe4 100644 --- a/libraries/advisory_rules.txt +++ b/libraries/advisory_rules.txt @@ -98,8 +98,8 @@ rule 'Minor Version' [! fired('Release Series')] rule 'Distribution' version_comment preg_match('/source/i',value) - Version is compiled from source, not a MySQL official binary. If you did not compile from source, you may be using a package modified by a distribution. - The MySQL manual only is accurate for official MySQL binaries, not any package distributions (such as RedHat, Debian/Ubuntu etc). + Version is compiled from source, not a MySQL official binary. + If you did not compile from source, you may be using a package modified by a distribution. The MySQL manual only is accurate for official MySQL binaries, not any package distributions (such as RedHat, Debian/Ubuntu etc). 'source' found in version_comment rule 'Distribution' @@ -111,10 +111,10 @@ rule 'Distribution' rule 'MySQL Architecture' system_memory - value > 3072 && !preg_match('/64/',version_compile_machine) - MySQL is not compiled as a 64-bit package, though your memory capacity is above 3 GiB. - MySQL might not be able to access all of your memory. You might want to consider installing the 64-bit version of MySQL. - Available memory on this host: %s | implode(' ',PMA_formatByteDown(value*1024*1024, 2, 2)) + value > 3072*1024 && !preg_match('/64/',version_compile_machine) + MySQL is not compiled as a 64-bit package. + Your memory capacity is above 3 GiB (assuming the Server is on localhost), so MySQL might not be able to access all of your memory. You might want to consider installing the 64-bit version of MySQL. + Available memory on this host: %s | implode(' ',PMA_formatByteDown(value*1024, 2, 2)) # # Query cache