bug #1783620 [parser] Subquery results without "as" are ignored
This commit is contained in:
@@ -44,7 +44,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
- bug #1764182 [cookies] Suhosin cookie encryption breaks phpMyAdmin
|
||||
- bug #1798786 [import] Wrong error when a string contains semicolon
|
||||
- bug #1813508 [login] Missing parameter: field after re-login
|
||||
- bug #1710144 [parser] space after COUNT breaks Export but not Query
|
||||
- bug #1710144 [parser] Space after COUNT breaks Export but not Query
|
||||
- bug #1783620 [parser] Subquery results without "as" are ignored
|
||||
|
||||
2.11.3.0 (2007-12-08)
|
||||
- patch #1818389 to remove a notice (failed to flush buffer), thanks to
|
||||
|
@@ -827,6 +827,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
|
||||
$number_of_brackets = 0;
|
||||
$in_subquery = false;
|
||||
$seen_subquery = false;
|
||||
|
||||
// for SELECT EXTRACT(YEAR_MONTH FROM CURDATE())
|
||||
// we must not use CURDATE as a table_ref
|
||||
@@ -1098,6 +1099,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
if ($upper_data == 'SELECT') {
|
||||
if ($number_of_brackets > 0) {
|
||||
$in_subquery = true;
|
||||
$seen_subquery = true;
|
||||
// this is a subquery so do not analyze inside it
|
||||
continue;
|
||||
}
|
||||
@@ -1146,7 +1148,9 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
if ($subresult['querytype'] == 'SELECT' && !$in_group_concat) {
|
||||
if ($subresult['querytype'] == 'SELECT'
|
||||
&& ! $in_group_concat
|
||||
&& ! ($seen_subquery && $arr[$i - 1]['type'] == 'punct_bracket_close_round')) {
|
||||
if (!$seen_from) {
|
||||
if ($previous_was_identifier && isset($chain)) {
|
||||
// found alias for this select_expr, save it
|
||||
|
Reference in New Issue
Block a user