diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 15e0e22f3..c72886607 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1273,7 +1273,9 @@ function PMA_showMessage($message, $sql_query = null) * @author Marc Delisle */ function PMA_profilingCheckbox($sql_query) { - if (PMA_MYSQL_INT_VERSION >= 50037) { + // 5.0.37 has profiling but for example, 5.1.20 does not + // (avoid doing a fetch_value for MySQL before 5.0.37) + if (PMA_MYSQL_INT_VERSION >= 50037 && PMA_DBI_fetch_value("SHOW VARIABLES LIKE 'profiling'")) { echo '
' . "\n"; echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']); echo '' . "\n";