diff --git a/ChangeLog b/ChangeLog index 14d87bc03..471d38ce7 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2006-01-11 Marc Delisle + * sql.php, libraries/sqlparser.lib.php: other fixes for bug #1394479 + 2006-01-11 Michal Čihař * main.php: Do not fail if no server is defined. * main.php, libraries/left_header.inc.php, diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 405242fc3..a25c19210 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -1541,7 +1541,7 @@ if ( ! defined( 'PMA_MINIMUM_COMMON' ) ) { // clear $upper_data for next iteration $upper_data=''; - if ($collect_section_before_limit) { + if ($collect_section_before_limit && $arr[$i]['type'] != 'punct_queryend') { $section_before_limit .= $arr[$i]['data'] . $sep; } else { $section_after_limit .= $arr[$i]['data'] . $sep; diff --git a/sql.php b/sql.php index 79912900f..8d699515b 100644 --- a/sql.php +++ b/sql.php @@ -337,7 +337,7 @@ else { // a section_after_limit, we now have to analyze $display_query // to display it correctly - if (!empty($analyzed_sql[0]['section_after_limit'])) { + if (!empty($analyzed_sql[0]['section_after_limit']) && trim($analyzed_sql[0]['section_after_limit']) != ';') { $analyzed_display_query = PMA_SQP_analyze(PMA_SQP_parse($display_query)); $display_query = $analyzed_display_query[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_display_query[0]['section_after_limit']; }