bug #1394779, SQL executer tries to find keys from current table

This commit is contained in:
Marc Delisle
2006-01-11 20:16:20 +00:00
parent fb7ba99648
commit 841b3403c7
3 changed files with 5 additions and 2 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2006-01-11 Marc Delisle <lem9@users.sourceforge.net>
* sql.php, libraries/sqlparser.lib.php: other fixes for bug #1394479
2006-01-11 Michal Čihař <michal@cihar.com>
* main.php: Do not fail if no server is defined.
* main.php, libraries/left_header.inc.php,

View File

@@ -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;

View File

@@ -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'];
}