diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 1922bf0e6b..ee1481dfcf 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -1145,7 +1145,7 @@ class PMA_Util */ if (isset($analyzed_display_query[0]['queryflags']['select_from']) - && isset($GLOBALS['sql_limit_to_append']) + && ! empty($GLOBALS['sql_limit_to_append']) ) { $query_base = $analyzed_display_query[0]['section_before_limit'] . "\n" . $GLOBALS['sql_limit_to_append'] diff --git a/sql.php b/sql.php index 7b18b1d10b..2f5717f511 100644 --- a/sql.php +++ b/sql.php @@ -560,6 +560,7 @@ if ($GLOBALS['cfg']['RememberSorting'] PMA_handleSortOrder($db, $table, $analyzed_sql, $full_sql_query); } +$sql_limit_to_append = ''; // Do append a "LIMIT" clause? if (($_SESSION['tmp_user_values']['max_rows'] != 'all') && ! ($is_count || $is_export || $is_func || $is_analyse)