mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 18:59:12 +02:00
The Autoincrement Value is now reset of all data is cleared using the mysql logstream maintenance functions
This commit is contained in:
parent
453b418439
commit
1697083572
@ -567,6 +567,16 @@ class LogStreamDB extends LogStream {
|
||||
{
|
||||
// Get affected rows and return!
|
||||
$rowcount = mysql_affected_rows();
|
||||
|
||||
// Reset AUTO_INCREMENT if all records were deleted!
|
||||
if ( $nDateTimeStamp == 0 )
|
||||
{
|
||||
$szSql = "ALTER TABLE " . $this->_logStreamConfigObj->DBTableName . " AUTO_INCREMENT=0";
|
||||
$myQuery = mysql_query($szSql, $this->_dbhandle);
|
||||
// error occured, output DEBUG message
|
||||
if (!$myQuery)
|
||||
$this->PrintDebugError("CleanupLogdataByDate failed to reset AUTO_INCREMENT for '" . $this->_logStreamConfigObj->DBTableName . "' table. ");
|
||||
}
|
||||
|
||||
// Free result not needed here!
|
||||
//mysql_free_result ($myQuery);
|
||||
|
Loading…
x
Reference in New Issue
Block a user