You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4453 Fix SELECT ... LIMIT 0
, now it returns an empty set as expected
This commit is contained in:
@ -429,6 +429,13 @@ void TupleAnnexStep::executeNoOrderBy()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (UNLIKELY(fRowsReturned >= fLimitCount))
|
||||
{
|
||||
fLimitHit = true;
|
||||
fJobList->abortOnLimit((JobStep*) this);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fConstant)
|
||||
fConstant->fillInConstants(fRowIn, fRowOut);
|
||||
else
|
||||
@ -441,11 +448,6 @@ void TupleAnnexStep::executeNoOrderBy()
|
||||
fRowOut.nextRow();
|
||||
fRowIn.nextRow();
|
||||
}
|
||||
else
|
||||
{
|
||||
fLimitHit = true;
|
||||
fJobList->abortOnLimit((JobStep*) this);
|
||||
}
|
||||
}
|
||||
|
||||
if (fRowGroupOut.getRowCount() > 0)
|
||||
@ -523,15 +525,17 @@ void TupleAnnexStep::executeNoOrderByWithDistinct()
|
||||
|
||||
if (inserted.second)
|
||||
{
|
||||
fRowGroupOut.incRowCount();
|
||||
fRowOut.nextRow();
|
||||
|
||||
if (UNLIKELY(++fRowsReturned >= fLimitCount))
|
||||
if (UNLIKELY(fRowsReturned >= fLimitCount))
|
||||
{
|
||||
fLimitHit = true;
|
||||
fJobList->abortOnLimit((JobStep*) this);
|
||||
continue;
|
||||
}
|
||||
|
||||
++fRowsReturned;
|
||||
fRowGroupOut.incRowCount();
|
||||
fRowOut.nextRow();
|
||||
|
||||
if (UNLIKELY(fRowGroupOut.getRowCount() >= rowgroup::rgCommonSize))
|
||||
{
|
||||
dataVec.push_back(rgDataOut);
|
||||
|
Reference in New Issue
Block a user