Skip to content

Commit 73efd6e

Browse files
Fixed the Pagination missing when using SELECT DISTINCT (#18493)
Signed-off-by: Sachin Bahukhandi <sachinb0013@gmail.com>
1 parent daa252b commit 73efd6e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎libraries/classes/Sql.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ private function countQueryResults(
701701
$statement->limit = false;
702702
}
703703

704-
if (! $statementInfo->isGroup && count($statement->expr) === 1) {
704+
if (! $statementInfo->isGroup && ! $statementInfo->distinct && count($statement->expr) === 1) {
705705
$statement->expr[0] = new Expression();
706706
$statement->expr[0]->expr = '1';
707707
}

0 commit comments

Comments
 (0)