(only for Oracle) Fixed if direccion of any agents has NULL, snmp console fail to list

unregistered agents' trap (by using "NOT IN" against NULL-inclued list).
This commit is contained in:
Hirofumi Kosaka 2016-01-08 17:33:34 +09:00
parent 2b0035fcf5
commit 77d86636c4
1 changed files with 3 additions and 3 deletions

View File

@ -234,7 +234,7 @@ switch ($config["dbtype"]) {
WHERE (source IN (
SELECT direccion FROM tagente
WHERE id_grupo IN ($str_user_groups)
) OR source='' OR source NOT IN (SELECT direccion FROM tagente)) %s
) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL)) %s
ORDER BY timestamp DESC";
break;
}
@ -266,7 +266,7 @@ switch ($config["dbtype"]) {
WHERE (source IN (
SELECT direccion FROM tagente
WHERE id_grupo IN ($str_user_groups)
) OR source='' OR source NOT IN (SELECT direccion FROM tagente))
) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL))
%s
ORDER BY timestamp DESC";
$sql_count = "SELECT COUNT(id_trap)
@ -275,7 +275,7 @@ switch ($config["dbtype"]) {
source IN (
SELECT direccion FROM tagente
WHERE id_grupo IN ($str_user_groups)
) OR source='' OR source NOT IN (SELECT direccion FROM tagente))
) OR source='' OR source NOT IN (SELECT direccion FROM tagente WHERE direccion IS NOT NULL))
%s";
break;
}