You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: setup.php
+24-3Lines changed: 24 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1176,13 +1176,34 @@ function syslog_utilities_action($action) {
1176
1176
if ($action == 'purge_syslog_hosts') {
1177
1177
$records = 0;
1178
1178
1179
-
syslog_db_execute('DELETE FROM syslog_hosts WHERE host_id NOT IN (SELECT DISTINCT host_id FROM syslog UNION SELECT DISTINCT host_id FROM syslog_removed)');
1179
+
syslog_db_execute('DELETE FROM syslog_hosts
1180
+
WHERE host_id NOT IN (
1181
+
SELECT DISTINCT host_id
1182
+
FROM syslog
1183
+
UNION
1184
+
SELECT DISTINCT host_id
1185
+
FROM syslog_removed
1186
+
)');
1180
1187
$records += db_affected_rows($syslog_cnn);
1181
1188
1182
-
syslog_db_execute('DELETE FROM syslog_host_facilities WHERE host_id NOT IN (SELECT DISTINCT host_id FROM syslog UNION SELECT DISTINCT host_id FROM syslog_removed)');
1189
+
syslog_db_execute('DELETE FROM syslog_host_facilities
1190
+
WHERE host_id NOT IN (
1191
+
SELECT DISTINCT host_id
1192
+
FROM syslog
1193
+
UNION
1194
+
SELECT DISTINCT host_id
1195
+
FROM syslog_removed
1196
+
)');
1183
1197
$records += db_affected_rows($syslog_cnn);
1184
1198
1185
-
syslog_db_execute('DELETE FROM syslog_statistics WHERE host_id NOT IN (SELECT DISTINCT host_id FROM syslog UNION SELECT DISTINCT host_id FROM syslog_removed)');
1199
+
syslog_db_execute('DELETE FROM syslog_statistics
1200
+
WHERE host_id NOT IN (
1201
+
SELECT DISTINCT host_id
1202
+
FROM syslog
1203
+
UNION
1204
+
SELECT DISTINCT host_id
1205
+
FROM syslog_removed
1206
+
)');
1186
1207
$records += db_affected_rows($syslog_cnn);
1187
1208
1188
1209
raise_message('syslog_info', __('There were %s Device records removed from the Syslog database', $records, 'syslog'), MESSAGE_LEVEL_INFO);
0 commit comments