mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-04-14 02:49:12 -04:00
fix: use prepare instead of prepare_cached in Filter::Execute
The SQL changes every cycle due to zmDiskPercent/zmDiskBlocks/zmSystemLoad string substitution with live values, so prepare_cached never actually returns a cached handle. Instead it leaks one cache entry per distinct substituted value over the process lifetime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -100,7 +100,7 @@ sub Execute {
|
||||
|
||||
|
||||
Debug("Filter::Execute SQL ($sql)");
|
||||
my $sth = $ZoneMinder::Database::dbh->prepare_cached($sql)
|
||||
my $sth = $ZoneMinder::Database::dbh->prepare($sql)
|
||||
or Fatal("Can't prepare '$sql': ".$ZoneMinder::Database::dbh->errstr());
|
||||
my $res = $sth->execute();
|
||||
if ( !$res ) {
|
||||
|
||||
Reference in New Issue
Block a user