From: Aki Tuomi Date: Tue, 14 Oct 2014 07:27:06 +0000 (+0300) Subject: Use transaction when updating serial X-Git-Tag: rec-3.7.0-rc1~189^2~6^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1817%2Fhead;p=thirdparty%2Fpdns.git Use transaction when updating serial --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 24342e2c23..f486f2c520 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -612,7 +612,10 @@ int increaseSerial(const string& zone, DNSSECKeeper &dk) } rrs[0].content = serializeSOAData(sd); + sd.db->startTransaction("", -1); + if (! sd.db->replaceRRSet(sd.domain_id, zone, rr.qtype, rrs)) { + sd.db->abortTransaction(); cerr<<"Backend did not replace SOA record. Backend might not support this operation."<commitTransaction(); + cout<<"SOA serial for zone "<