Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph Templates has duplicate SQL delete statement #3755

Closed
netniV opened this issue Aug 14, 2020 · 0 comments
Closed

Graph Templates has duplicate SQL delete statement #3755

netniV opened this issue Aug 14, 2020 · 0 comments
Assignees
Labels
bug Undesired behaviour database Database and database support issues resolved A fixed issue templates Issues related to templating
Milestone

Comments

@netniV
Copy link
Member

netniV commented Aug 14, 2020

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.

@netniV netniV added bug Undesired behaviour templates Issues related to templating database Database and database support issues labels Aug 14, 2020
@netniV netniV added this to the 1.2.15 milestone Aug 14, 2020
@netniV netniV self-assigned this Aug 14, 2020
netniV added a commit that referenced this issue Aug 14, 2020
@netniV netniV added the resolved A fixed issue label Aug 14, 2020
@netniV netniV closed this as completed Aug 14, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour database Database and database support issues resolved A fixed issue templates Issues related to templating
Projects
None yet
Development

No branches or pull requests

1 participant