Changeset 347 for trunk/DNSDB.pm


Ignore:
Timestamp:
06/15/12 18:08:14 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Clean up dns.sql a little; some of this will be more important once
automagical table upgrades are implemented

  • set primary keys so we can't even accidentally add duplicate domains or revzones
  • bump dbversion in misc table

Fix buglet in _hostparent() that triggered if the hostname passed in
started with *.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r346 r347  
    296296  my $dbh = shift;
    297297  my $hname = shift;
    298  
     298
     299  $hname =~ s/^\*\.//;  # this should be impossible to find in the domains table.
    299300  my @hostbits = split /\./, $hname;
    300301  my $sth = $dbh->prepare("SELECT count(*),domain_id FROM domains WHERE domain = ? GROUP BY domain_id");
Note: See TracChangeset for help on using the changeset viewer.