Changeset 213 for branches/stable


Ignore:
Timestamp:
04/05/05 13:39:53 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Fix minor SQL buglets in consistency-check.pl that would include
the wrong records in some checks, causing false errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/consistency-check.pl

    r212 r213  
    177177        "from allocations where cidr <<= '$container' and type like '_r') ".
    178178        "union (select network(cidr) as net, broadcast(cidr) as bcast ".
    179         "from freeblocks where cidr <<= '$container' and routed='w') order by net");
     179        "from freeblocks where cidr <<= '$container' and not (routed='y' or routed='n')) ".
     180        "order by net");
    180181    $sth->execute;
    181182
     
    217218print "Checking for correctness on 'defined' CustIDs:\n";
    218219# New check:  Make sure "defined" CustIDs are correct.
    219 $sth = $dbh->prepare("select cidr,type,custid from allocations where not type='cn' order by cidr");
     220$sth = $dbh->prepare("select cidr,type,custid from allocations where not (type='cn' or type like '_r') order by cidr");
    220221$sth->execute;
    221222while (@data = $sth->fetchrow_array) {
Note: See TracChangeset for help on using the changeset viewer.