From e10ece82140b67a584a58b5f65ef706f177d1d53 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Sat, 7 Apr 2012 16:00:20 +0530 Subject: [PATCH] bug #3515666 [display] Profiling chart shows wrong data --- ChangeLog | 1 + sql.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a3ea1c2062..3b707866ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog - bug [interface] Fixed missing Codemirror for inline query edit when exporting a result set - bug #3514490 [auth] Multiple Navigation panels bug still present - bug #3515181 [users] Error in create user + underscore + create database +- bug #3515666 [display] Profiling chart shows wrong data 3.5.0.0 (not yet released) + rfe #2021981 [interface] Add support for mass prefix change. diff --git a/sql.php b/sql.php index cccd308453..c4243d24ea 100644 --- a/sql.php +++ b/sql.php @@ -906,7 +906,11 @@ $(document).ready(makeProfilingChart); echo ' ' . "\n"; echo '' . ucwords($one_result['Status']) . '' . "\n"; echo '' . (PMA_formatNumber($one_result['Duration'], 3, 1)) . 's' . "\n"; - $chart_json[ucwords($one_result['Status'])] = $one_result['Duration']; + if (isset($chart_json[ucwords($one_result['Status'])])) { + $chart_json[ucwords($one_result['Status'])] += $one_result['Duration']; + } else { + $chart_json[ucwords($one_result['Status'])] = $one_result['Duration']; + } } echo '' . "\n";