From 561983aff487342912f4dc519275cf8d9c256043 Mon Sep 17 00:00:00 2001 From: Spun Nakandala Date: Fri, 21 Jun 2013 21:13:24 +0530 Subject: [PATCH 1/2] "Show all" feature no longer works problem corrected --- libraries/parse_analyze.inc.php | 3 +-- sql.php | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libraries/parse_analyze.inc.php b/libraries/parse_analyze.inc.php index 25373ed0cd..5ce3ff5ff1 100644 --- a/libraries/parse_analyze.inc.php +++ b/libraries/parse_analyze.inc.php @@ -87,8 +87,7 @@ if ($GLOBALS['cfg']['RememberSorting'] } // checks whether a LIMIT clause should be added to the query -if (($_SESSION['tmp_user_values']['max_rows'] != 'all') - && ! ($is_count || $is_export || $is_func || $is_analyse) +if (! ($is_count || $is_export || $is_func || $is_analyse) && isset($analyzed_sql[0]['queryflags']['select_from']) && ! isset($analyzed_sql[0]['queryflags']['offset']) && empty($analyzed_sql[0]['limit_clause']) diff --git a/sql.php b/sql.php index 81fb8d5f56..7a2c9d330b 100644 --- a/sql.php +++ b/sql.php @@ -319,7 +319,9 @@ if ($is_remember_sorting_order) { $sql_limit_to_append = ''; // Do append a "LIMIT" clause? -if ($is_append_limit_clause) { +if (($_SESSION['tmp_user_values']['max_rows'] != 'all') + && $is_append_limit_clause +) { $sql_limit_to_append = ' LIMIT ' . $_SESSION['tmp_user_values']['pos'] . ', ' . $_SESSION['tmp_user_values']['max_rows'] . " "; $full_sql_query = PMA_getSqlWithLimitClause( @@ -327,7 +329,7 @@ if ($is_append_limit_clause) { $analyzed_sql, $sql_limit_to_append ); - + /** * @todo pretty printing of this modified query */ From 8d12cbb14dd74cc421cd308e6c28558f8e146eff Mon Sep 17 00:00:00 2001 From: Spun Nakandala Date: Fri, 21 Jun 2013 21:16:46 +0530 Subject: [PATCH 2/2] extra space removed --- sql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql.php b/sql.php index 7a2c9d330b..28e1c4d468 100644 --- a/sql.php +++ b/sql.php @@ -329,7 +329,7 @@ if (($_SESSION['tmp_user_values']['max_rows'] != 'all') $analyzed_sql, $sql_limit_to_append ); - + /** * @todo pretty printing of this modified query */