Skip to content

Graph Templates has duplicate SQL delete statement #3755

Description

@netniV

Describe the bug

The following diff should be applied (patch being applied shortly):

diff --git a/graph_templates.php b/graph_templates.php
index 21d8e66..304333c 100644
--- a/graph_templates.php
+++ b/graph_templates.php
@@ -238,9 +238,6 @@ function form_actions() {
                                        db_execute('DELETE FROM snmp_query_graph_rrd_sv
                                                WHERE snmp_query_graph_id IN (' . implode(', ', $snmp_graph_ids) . ')');

-                                       db_execute('DELETE FROM snmp_query_graph_rrd_sv
-                                               WHERE snmp_query_graph_id IN (' . implode(', ', $snmp_graph_ids) . ')');
-
                                        db_execute('DELETE FROM snmp_query_graph_sv
                                                WHERE snmp_query_graph_id IN (' . implode(', ', $snmp_graph_ids) . ')');

Whilst the query should be irrelevant, searching the indexes could potentially be time consuming depending on the database.

Metadata

Metadata

Assignees

Labels

bugUndesired behaviourdatabaseDatabase and database support issuesresolvedA fixed issuetemplatesIssues related to templating

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions