Merge #15573 - Display profiling when output has no rows

Pull-request: #15573
Ref: #15465

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-11-18 23:15:27 +01:00
commit f070efe37c
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 15 additions and 2 deletions

View File

@ -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

View File

@ -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 {