From 43c01be337f8c7e1feb05c48474dda8a75c9dc02 Mon Sep 17 00:00:00 2001 From: koichirok Date: Thu, 8 Mar 2012 07:12:22 +0000 Subject: [PATCH] 2012-03-08 Koichiro Kikuchi * util/pandora_db.pl: Fixed wrong SQL of my previous commit. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5718 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/util/pandora_db.pl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 0a1db6dc5f..cf005998c1 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2012-03-08 Koichiro Kikuchi + + * util/pandora_db.pl: Fixed wrong SQL of my previous commit. + 2012-03-08 Koichiro Kikuchi * util/pandora_db.pl: Don't delete alerts if non-init/unknown diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ffacd79886..9f30e0e42b 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -464,7 +464,7 @@ sub pandora_checkdb_consistency { db_do ($dbh, 'DELETE FROM tagente_modulo WHERE disabled = 0 AND id_agente_modulo = ?', $id_agente_modulo);; # Delete any alerts associated to the module - db_do ($dbh, 'DELETE FROM talert_template_modules WHERE id_agent_module = ? AND NOT EXISTS (SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente_modulo', $id_agente_modulo); + db_do ($dbh, 'DELETE FROM talert_template_modules WHERE id_agent_module = ? AND NOT EXISTS (SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente_modulo = ?)', $id_agente_modulo, $id_agente_modulo); } } print "[CHECKDB] Checking database consistency (Missing status)... \n";