From: ahu@ds9a.nl Date: Wed, 10 Apr 2019 07:44:48 +0000 (+0000) Subject: b2b-migrate did not open a transaction, breaking it for lmdb X-Git-Tag: dnsdist-1.4.0-alpha2~15^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7696%2Fhead;p=thirdparty%2Fpdns.git b2b-migrate did not open a transaction, breaking it for lmdb --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 9556faf19f..eb8f5c96c8 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -3200,11 +3200,15 @@ try // move records if (!src->list(di.zone, di.id, true)) throw PDNSException("Failed to list records"); nr=0; + + tgt->startTransaction(di.zone, di_new.id); + while(src->get(rr)) { rr.domain_id = di_new.id; if (!tgt->feedRecord(rr, DNSName())) throw PDNSException("Failed to feed record"); nr++; } + // move comments nc=0; if (src->listComments(di.id)) { @@ -3235,6 +3239,7 @@ try nk++; } } + tgt->commitTransaction(); cout<<"Moved "<