From 54084929a50a8be2a797972b65d637102b33d47b Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 26 Mar 2012 22:01:11 +0530 Subject: [PATCH] bug #3510784 [edit] Limit clause ignored when sort order is remembered --- ChangeLog | 1 + libraries/common.lib.php | 1 + sql.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a722e04c39..0bb23a116f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ phpMyAdmin - ChangeLog ====================== 3.5.1.0 (not yet released) +- bug #3510784 [edit] Limit clause ignored when sort order is remembered 3.5.0.0 (not yet released) + rfe #2021981 [interface] Add support for mass prefix change. diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 4e2b8d0ec0..0bd6cb13fe 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1087,6 +1087,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view ) { $query_base = $analyzed_display_query[0]['section_before_limit'] . "\n" . $GLOBALS['sql_order_to_append'] + . $analyzed_display_query[0]['limit_clause'] . ' ' . $analyzed_display_query[0]['section_after_limit']; // Need to reparse query diff --git a/sql.php b/sql.php index 42d72caae2..cccd308453 100644 --- a/sql.php +++ b/sql.php @@ -435,7 +435,7 @@ if ($GLOBALS['cfg']['RememberSorting'] // retrieve the remembered sorting order for current table $sql_order_to_append = ' ORDER BY ' . $sorted_col . ' '; $full_sql_query = $analyzed_sql[0]['section_before_limit'] . $sql_order_to_append - . $analyzed_sql[0]['section_after_limit']; + . $analyzed_sql[0]['limit_clause'] . ' ' . $analyzed_sql[0]['section_after_limit']; // update the $analyzed_sql $analyzed_sql[0]['section_before_limit'] .= $sql_order_to_append;