From 81fbdc6ffd653a40e2dafa16fff8ed291dccfc23 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 14:24:06 +0000 Subject: [PATCH] fix: PDO ConsolidateDataByField missing WHERE clause regeneration (issue #71) Agent-Logs-Url: https://github.com/rsyslog/loganalyzer/sessions/95499932-66e0-425d-baa3-1e76ad3972bf Co-authored-by: alorbach <1675286+alorbach@users.noreply.github.com> --- src/classes/logstreampdo.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/classes/logstreampdo.class.php b/src/classes/logstreampdo.class.php index bbacb436..121b1e00 100644 --- a/src/classes/logstreampdo.class.php +++ b/src/classes/logstreampdo.class.php @@ -1479,6 +1479,14 @@ public function ConsolidateDataByField($szConsFieldId, $nRecordLimit, $szSortFie $szLimitSqlAfter = ""; } + // Create SQL Where Clause! + if ( $this->_SQLwhereClause == "" ) + { + $res = $this->CreateSQLWhereClause(); + if ( $res != SUCCESS ) + return $res; + } + // Create SQL String now! $szSql = "SELECT " . $szLimitSqlBefore .