Skip to content

Commit

Permalink
In for loop, separating the variables in if condition is not the
Browse files Browse the repository at this point in the history
way to compare the conditions (If comma separated only the last
specified condition gets executed). This is not desirable, because
terator it can point to results from MessageTableIndex queries and
 jt can point to resultss from ObjectTable and their dimensionality
 is not same and this can result in crash.
Closes-Bug:#1675598

Change-Id: I8af6ef7166900ea4705715fd317d2655d2c3b984
  • Loading branch information
arvindvis committed Mar 30, 2017
1 parent 60bf671 commit 7426507
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query_engine/set_operation.cc
Expand Up @@ -15,7 +15,7 @@ bool query_result_unit_t::operator<(const query_result_unit_t& rhs) const
{
GenDb::DbDataValueVec::const_iterator it = info.begin();
GenDb::DbDataValueVec::const_iterator jt = rhs.info.begin();
for (; it != info.end(), jt != rhs.info.end(); it++, jt++) {
for (; it != info.end() && jt != rhs.info.end(); it++, jt++) {
if (*it < *jt) {
return true;
} else if (*jt < *it) {
Expand Down

0 comments on commit 7426507

Please sign in to comment.