From b41976e5520c87a066c8da73b7972d8f7c6ff2c0 Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Tue, 2 Aug 2011 01:36:57 +0200 Subject: [PATCH] Drizzle: Respect MaxCharactersInDisplayedSQL in process list on Server Status page --- server_status.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server_status.php b/server_status.php index cf4f1a2545..a5f4113e0e 100644 --- a/server_status.php +++ b/server_status.php @@ -1044,7 +1044,7 @@ function printServerTraffic() { p.command AS Command, p.time AS Time, p.state AS State, - " . ($show_full_sql ? 's.query' : 'p.info') . " AS Info + " . ($show_full_sql ? 's.query' : 'left(p.info, ' . (int)$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] . ')') . " AS Info FROM data_dictionary.PROCESSLIST p " . ($show_full_sql ? 'LEFT JOIN data_dictionary.SESSIONS s ON s.session_id = p.id' : ''); } else { @@ -1071,9 +1071,9 @@ function printServerTraffic() { - <?php echo empty($_REQUEST['full']) ? __('Show Full Queries') : __('Truncate Shown Queries'); ?> + title=""> + <?php echo $show_full_sql ? __('Truncate Shown Queries') : __('Show Full Queries'); ?> @@ -1099,7 +1099,7 @@ function printServerTraffic() { if (empty($process['Info'])) { echo '---'; } else { - if (empty($_REQUEST['full']) && strlen($process['Info']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { + if (!$show_full_sql && strlen($process['Info']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { echo htmlspecialchars(substr($process['Info'], 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'])) . '[...]'; } else { echo PMA_SQP_formatHtml(PMA_SQP_parse($process['Info'])); -- 2.11.4.GIT