Fix missing return value
@@ -1597,7 +1597,7 @@ unsigned long limit = 0;
limit = sent;
logger->info("Sent is %d", sent);
}
- logger->info("Purge by Rows called with flags %x", flags);
+ logger->warn("Purge by Rows called with flags %x, rows %d, limit %d", flags, rows, limit);
// Don't save unsent rows
int rowcount;
do {
@@ -1655,7 +1655,7 @@ unsigned long limit = 0;
}
SQLBuffer sql;
- logger->info("Max Id %d, min Id %d, delete point %d", maxId, minId, deletePoint);
+ logger->warn("RowCount %d, Max Id %d, min Id %d, delete point %d", rowcount, maxId, minId, deletePoint);
sql.append("delete from readings where id < ");
sql.append(deletePoint);
@@ -1671,7 +1671,7 @@ unsigned long limit = 0;
numReadings = rowcount - rowsAffected;
// Release memory for 'query' var
delete[] query;
- logger->info("Deleted %d rows", rowsAffected);
+ logger->warn("Deleted %d rows", rowsAffected);
if (rowsAffected == 0)
{
break;
@@ -1703,6 +1703,7 @@ unsigned long limit = 0;
result = convert.str();
logger->warn("Purge by Rows complete: %s", result.c_str());
+ return deletedRows;
}
