[Pdns-users] PowerDNS MySQL API in Perl by a PowerDNS user

Duane duane at e164.org
Wed Nov 14 23:51:16 UTC 2007


bert hubert wrote:

I've been thinking about something similar for a while, but a little
different, in fact a lot of the work in the perl code I've seen could
easily be dealt with in another manner and a lot more efficient and
language neutral.

What the default pdns mysql schema lacks is foreign keys and a couple of
well crafted triggers and/or stored procedures, even though InnoDB is
already the suggested table type. Well InnoDB has foreign keys, but it
needs MySQL 5+ for triggers and stored procedures.

For example, a trigger could be added to remove all rows from the
records table when the zone is removed.

Also in the perl code is a function to check record type, why not just
use an enum field and check for insert/update errors?

Also on the insert/update/delete of rows in the records table you could
have another trigger to update the SOA for the domain.

I don't mean to disuade the person that has coded this, but imho isn't
the best way to go when dealing with MySQL specifically.

-- 

Best regards,
 Duane

http://www.freeauth.org - Enterprise Two Factor Authentication
http://www.nodedb.com - Think globally, network locally
http://www.sydneywireless.com - Telecommunications Freedom
http://e164.org - Because e164.arpa is a tax on VoIP

"In the long run the pessimist may be proved right,
    but the optimist has a better time on the trip."


More information about the Pdns-users mailing list