Measures basic query time [#571934]
This commit is contained in:
@@ -1431,7 +1431,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
|
|||||||
$last_shown_rec = ($GLOBALS['session_max_rows'] == 'all' || $pos_next > $total)
|
$last_shown_rec = ($GLOBALS['session_max_rows'] == 'all' || $pos_next > $total)
|
||||||
? $total - 1
|
? $total - 1
|
||||||
: $pos_next - 1;
|
: $pos_next - 1;
|
||||||
PMA_showMessage($GLOBALS['strShowingRecords'] . " $pos - $last_shown_rec ($total " . $GLOBALS['strTotal'] . $selectstring . ')');
|
PMA_showMessage($GLOBALS['strShowingRecords'] . " $pos - $last_shown_rec ($total " . $GLOBALS['strTotal'] . $selectstring . ', ' . sprintf($GLOBALS['strQueryTime'], $GLOBALS['querytime']) . ')');
|
||||||
} else if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
} else if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
|
||||||
PMA_showMessage($GLOBALS['strSQLQuery']);
|
PMA_showMessage($GLOBALS['strSQLQuery']);
|
||||||
}
|
}
|
||||||
|
11
sql.php3
11
sql.php3
@@ -296,8 +296,17 @@ else {
|
|||||||
$num_rows = 0;
|
$num_rows = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// garvin: Measure query time. TODO-Item http://sourceforge.net/tracker/index.php?func=detail&aid=571934&group_id=23067&atid=377411
|
||||||
|
list($usec, $sec) = explode(' ',microtime());
|
||||||
|
$querytime_before = ((float)$usec + (float)$sec);
|
||||||
|
|
||||||
$result = @PMA_mysql_query($full_sql_query);
|
$result = @PMA_mysql_query($full_sql_query);
|
||||||
|
|
||||||
|
list($usec, $sec) = explode(' ',microtime());
|
||||||
|
$querytime_after = ((float)$usec + (float)$sec);
|
||||||
|
|
||||||
|
$GLOBALS['querytime'] = $querytime_after - $querytime_before;
|
||||||
|
|
||||||
// Displays an error message if required and stop parsing the script
|
// Displays an error message if required and stop parsing the script
|
||||||
if (PMA_mysql_error()) {
|
if (PMA_mysql_error()) {
|
||||||
$error = PMA_mysql_error();
|
$error = PMA_mysql_error();
|
||||||
@@ -449,6 +458,8 @@ else {
|
|||||||
$message = $strEmptyResultSet;
|
$message = $strEmptyResultSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$message .= " (" . sprintf($strQueryTime, $GLOBALS['querytime']) . ")";
|
||||||
|
|
||||||
if ($is_gotofile) {
|
if ($is_gotofile) {
|
||||||
$goto = ereg_replace('\.\.*', '.', $goto);
|
$goto = ereg_replace('\.\.*', '.', $goto);
|
||||||
// Checks for a valid target script
|
// Checks for a valid target script
|
||||||
|
Reference in New Issue
Block a user