mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Added missing function in pdo logstream class
This commit is contained in:
parent
5d0b3255ee
commit
1ef5e2db96
@ -613,6 +613,9 @@ class LogStreamDB extends LogStream {
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
// Missing important properties
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
||||
|
@ -681,6 +681,46 @@ class LogStreamPDO extends LogStream {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Implementation of the SaveMessageChecksum
|
||||
*
|
||||
* Creates an database UPDATE Statement and performs it!
|
||||
*/
|
||||
public function SaveMessageChecksum( $arrProperitesIn )
|
||||
{
|
||||
global $querycount, $dbmapping;
|
||||
$szTableType = $this->_logStreamConfigObj->DBTableType;
|
||||
|
||||
if ( isset($arrProperitesIn[SYSLOG_UID]) && isset($arrProperitesIn[MISC_CHECKSUM]) && isset($dbmapping[$szTableType]['DBMAPPINGS'][MISC_CHECKSUM]) )
|
||||
{
|
||||
// DELETE DATA NOW!
|
||||
$szSql = "UPDATE " . $this->_logStreamConfigObj->DBTableName .
|
||||
" SET " . $dbmapping[$szTableType]['DBMAPPINGS'][MISC_CHECKSUM] . " = " . $arrProperitesIn[MISC_CHECKSUM] .
|
||||
" WHERE " . $dbmapping[$szTableType]['DBMAPPINGS'][SYSLOG_UID] . " = " . $arrProperitesIn[SYSLOG_UID];
|
||||
$myQuery = $this->_dbhandle->query($szSql);
|
||||
if ( $myQuery )
|
||||
{
|
||||
// Free query now
|
||||
$myQuery->closeCursor();
|
||||
|
||||
// Return success
|
||||
return SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
// error occured, output DEBUG message
|
||||
$this->PrintDebugError("SaveMessageChecksum failed with SQL Statement ' " . $szSql . " '");
|
||||
|
||||
// Failed
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
// Missing important properties
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of ConsolidateItemListByField
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user