Commit 29e51412 authored by guilhermeblanco's avatar guilhermeblanco

[2.0] Reverted r7392 which generates broken SQL query.

parent bb94f6ea
......@@ -2129,7 +2129,7 @@ class Parser
/**
* ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")"
* | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings
* | FunctionsReturningDatetime | ResultVariable
* | FunctionsReturningDatetime | IdentificationVariable
*/
public function ArithmeticPrimary()
{
......@@ -2154,7 +2154,7 @@ class Parser
return $this->SingleValuedPathExpression();
}
return $this->ResultVariable();
return $this->IdentificationVariable();
case Lexer::T_INPUT_PARAMETER:
return $this->InputParameter();
......
......@@ -1640,9 +1640,7 @@ class SqlWalker implements TreeWalker
} else if ($primary instanceof AST\Node) {
$sql .= $primary->dispatch($this);
} else if (is_string($primary)) {
$columnName = $this->_queryComponents[$primary]['token']['value'];
$sql .= $this->_scalarResultAliasMap[$columnName];
// We need to deal with IdentificationVariable here
}
return $sql;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment