diff --git a/ChangeLog b/ChangeLog index 36bbe61453..f322d407cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ phpMyAdmin - ChangeLog - issue #14809 Fix error "is_uploaded_file() expects parameter 1 to be string" when inserting blobs from files - issue #15127 Fix white square when refreshing designer or browsing other pages - issue #13912 Detect when phpMyAdmin storage tables are not accessible, help users browse corrupt DBs +- issue #15465 Display profiling when query outputs no rows 4.9.1 (2019-09-20) - issue #15313 Added support for Twig 2 diff --git a/libraries/classes/Sql.php b/libraries/classes/Sql.php index 58cceb745e..a09f659817 100644 --- a/libraries/classes/Sql.php +++ b/libraries/classes/Sql.php @@ -1465,6 +1465,7 @@ EOT; * @param DisplayResults $displayResultsObject DisplayResult instance * @param array $extra_data extra data * @param string $pmaThemeImage uri of the theme image + * @param array|null $profiling_results profiling results * @param object $result executed query results * @param string $sql_query sql query * @param string $complete_query complete sql query @@ -1473,7 +1474,7 @@ EOT; */ private function getQueryResponseForNoResultsReturned(array $analyzed_sql_results, $db, $table, $message_to_show, $num_rows, $displayResultsObject, $extra_data, - $pmaThemeImage, $result, $sql_query, $complete_query + $pmaThemeImage, $profiling_results, $result, $sql_query, $complete_query ) { if ($this->isDeleteTransformationInfo($analyzed_sql_results)) { $this->deleteTransformationInfo($db, $table, $analyzed_sql_results); @@ -1532,6 +1533,17 @@ EOT; $analyzed_sql_results, true ); + if (isset($profiling_results)) { + $header = $response->getHeader(); + $scripts = $header->getScripts(); + $scripts->addFile('sql.js'); + $html_output .= $this->getHtmlForProfilingChart( + $url_query, + $db, + isset($profiling_results) ? $profiling_results : [] + ); + } + $html_output .= $displayResultsObject->getCreateViewQueryResultOp( $analyzed_sql_results ); @@ -2244,7 +2256,7 @@ EOT; $analyzed_sql_results, $db, $table, isset($message_to_show) ? $message_to_show : null, $num_rows, $displayResultsObject, $extra_data, - $pmaThemeImage, isset($result) ? $result : null, + $pmaThemeImage, $profiling_results, isset($result) ? $result : null, $sql_query, isset($complete_query) ? $complete_query : null ); } else {