From: Kees Monshouwer Date: Mon, 20 Dec 2021 15:57:40 +0000 (+0100) Subject: auth: lmdb: fix records removal in deleteDomain() X-Git-Tag: auth-4.7.0-alpha1~94^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11115%2Fhead;p=thirdparty%2Fpdns.git auth: lmdb: fix records removal in deleteDomain() --- diff --git a/modules/lmdbbackend/lmdbbackend.cc b/modules/lmdbbackend/lmdbbackend.cc index 7c33213610..f8ef095165 100644 --- a/modules/lmdbbackend/lmdbbackend.cc +++ b/modules/lmdbbackend/lmdbbackend.cc @@ -648,16 +648,7 @@ bool LMDBBackend::deleteDomain(const DNSName& domain) } doms.del(id); - compoundOrdername co; - string match = co(id); - - auto cursor = txn->txn->getCursor(txn->db->dbi); - MDBOutVal key, val; - if (!cursor.find(match, key, val)) { - do { - cursor.del(); - } while (!cursor.next(key, val) && key.get().rfind(match, 0) == 0); - } + deleteDomainRecords(*txn, id); if (needCommit) txn->txn->commit();