From: Bert Hubert Date: Tue, 14 Jan 2003 15:23:45 +0000 (+0000) Subject: wuh X-Git-Tag: pdns-2.9.5~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5443b5a76294ec6e20ff25f00b972ec3764cb3a7;p=pdns wuh git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@134 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/modules/gmysqlbackend/gmysqlbackend.cc b/modules/gmysqlbackend/gmysqlbackend.cc index 812aeae25..cbc43ec15 100644 --- a/modules/gmysqlbackend/gmysqlbackend.cc +++ b/modules/gmysqlbackend/gmysqlbackend.cc @@ -1,4 +1,4 @@ -// $Id: gmysqlbackend.cc,v 1.7 2002/12/16 18:02:24 ahu Exp $ +// $Id: gmysqlbackend.cc,v 1.8 2003/01/14 15:23:45 ahu Exp $ #include #include @@ -60,6 +60,19 @@ public: declare(suffix,"wildcard-any-id-query","Wildcard ANY with ID query","select content,ttl,prio,type,domain_id,name from records where like '%s' and domain_id='%d'"); declare(suffix,"list-query","AXFR query", "select content,ttl,prio,type,domain_id,name from records where domain_id='%d'"); + declare(suffix,"master-zone-query","Data", "select master from domains where name='%s' and type='SLAVE'"); + + declare(suffix,"info-zone-query","","select id,name,master,last_check,notified_serial,type from domains where name='%s'"); + + declare(suffix,"info-all-slaves-query","","select id,name,master,last_check,type from domains where type='SLAVE'"); + declare(suffix,"supermaster-query","", "select account from supermasters where ip='%s' and nameserver='%s'"); + declare(suffix,"insert-slave-query","", "insert into domains (type,name,master,account) values('SLAVE','%s','%s','%s')"); + declare(suffix,"insert-record-query","", "insert into records (content,ttl,prio,type,domain_id,name) values ('%s',%d,%d,'%s',%d,'%s')"); + declare(suffix,"update-serial-query","", "update domains set notified_serial=%d where id=%d"); + declare(suffix,"update-lastcheck-query","", "update domains set last_check=%d where id=%d"); + declare(suffix,"info-all-master-query","", "select id,name,master,last_check,notified_serial,type from domains where type='MASTER'"); + declare(suffix,"delete-zone-query","", "delete from records where domain_id=%d"); + }