bug 653964

This commit is contained in:
Marc Delisle
2003-05-23 20:50:49 +00:00
parent 68d800a124
commit 6486f0f3da
2 changed files with 9 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-05-23 Marc Delisle <lem9@users.sourceforge.net>
* libraries/sqlparser.lib.php3: bug 653964: wrong alias set by
the analyzer, bug analyzed thanks to Michal!
2003-05-23 Michal Cihar <nijel@users.sourceforge.net>
* read_dump.php3, tbl_alter.php3: Tabs highlighting...

View File

@@ -875,8 +875,12 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
if ($subresult['querytype'] == 'SELECT') {
if (!$seen_from) {
if ($previous_was_identifier) {
if ($previous_was_identifier && isset($chain)) {
// found alias for this select_expr, save it
// but only if we got something in $chain
// (for example, SELECT COUNT(*) AS cnt
// puts nothing in $chain, so we avoid
// setting the alias)
$alias_for_select_expr = $identifier;
} else {
$chain[] = $identifier;