From 7d66500669052611a6a1ec6ccc9ecf86002dca32 Mon Sep 17 00:00:00 2001 From: Dhyey Thakore <11143604+dhyey35@users.noreply.github.com> Date: Wed, 6 Mar 2019 00:42:14 +0530 Subject: [PATCH 1/2] Fix #14607 - Count rows only if needed (#14821) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dhyey Thakore (cherry picked from commit feca78456704cd8dd3d31ec78c8f7c29e185b8e5) Signed-off-by: MaurĂ­cio Meneghini Fauth --- libraries/classes/Sql.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/classes/Sql.php b/libraries/classes/Sql.php index 331edf7233..ca259dec70 100644 --- a/libraries/classes/Sql.php +++ b/libraries/classes/Sql.php @@ -1166,6 +1166,11 @@ EOT; // "Showing rows..." message // $_SESSION['tmpval']['max_rows'] = 'all'; $unlim_num_rows = $num_rows; + } elseif ($this->isAppendLimitClause($analyzed_sql_results) && $_SESSION['tmpval']['max_rows'] > $num_rows) { + // When user has not defined a limit in query and total rows in + // result are less than max_rows to display, there is no need + // to count total rows for that query again + $unlim_num_rows = $_SESSION['tmpval']['pos'] + $num_rows; } elseif ($analyzed_sql_results['querytype'] == 'SELECT' || $analyzed_sql_results['is_subquery'] ) { From ab3cc979d085dbfe6ab08310fdf807d90caa8748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Tue, 5 Mar 2019 16:14:37 -0300 Subject: [PATCH 2/2] Add ChangeLog entry for #14607 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ci skip] Signed-off-by: MaurĂ­cio Meneghini Fauth --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 947d5e1e49..1c3062cc2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ phpMyAdmin - ChangeLog - issue #14425 Fixed Null Checkbox automatically unmarked - issue #14870 Display correct date and time in Zip files - issue #14763 Fixed the loading symbol not appearing when refreshing the navigation +- issue #14607 Count rows only if needed 4.8.5 (2019-01-25) - issue Developer debug data was saved to the PHP error log