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";