Skip to content

Commit

Permalink
Fixed regression CORE-4108: Server crashes when executing sql query "…
Browse files Browse the repository at this point in the history
…delete from mytable order by id desc rows 2".
  • Loading branch information
dyemanov committed May 30, 2013
1 parent c631bd5 commit f73ca88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dsql/pass1.cpp
Expand Up @@ -1443,7 +1443,7 @@ static ValueListNode* pass1_group_by_list(DsqlCompilerScratch* dsqlScratch, Valu
if ((field = ExprNode::as<FieldNode>(sub)))
{
// check for alias or field node
if (field->dsqlQualifier.isEmpty() && field->dsqlName.hasData())
if (selectList && field->dsqlQualifier.isEmpty() && field->dsqlName.hasData())
{
// AB: Check first against the select list for matching column.
// When no matches at all are found we go on with our
Expand Down Expand Up @@ -2277,7 +2277,7 @@ ValueListNode* PASS1_sort(DsqlCompilerScratch* dsqlScratch, ValueListNode* input
ValueExprNode* aliasNode = NULL;

// check for alias or field node
if (field->dsqlQualifier.isEmpty() && field->dsqlName.hasData())
if (selectList && field->dsqlQualifier.isEmpty() && field->dsqlName.hasData())
{
// AB: Check first against the select list for matching column.
// When no matches at all are found we go on with our
Expand Down

0 comments on commit f73ca88

Please sign in to comment.