From 3d47408fc03fdbfd8c85ee3b5be18849ab98a782 Mon Sep 17 00:00:00 2001 From: "ahu@ds9a.nl" Date: Wed, 10 Apr 2019 07:44:48 +0000 Subject: [PATCH] b2b-migrate did not open a transaction, breaking it for lmdb --- pdns/pdnsutil.cc | 5 +++++ 1 file changed, 5 insertions(+) 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 "<