From: Kees Monshouwer Date: Sun, 14 Dec 2014 23:07:35 +0000 (+0100) Subject: oraclebackend: fix records pointing at root X-Git-Tag: auth-3.4.2~15^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96963e2938417d75e01963683a57a92ed7a1833f;p=thirdparty%2Fpdns.git oraclebackend: fix records pointing at root --- diff --git a/modules/oraclebackend/oraclebackend.cc b/modules/oraclebackend/oraclebackend.cc index 5020cf9dc6..f17033ecfc 100644 --- a/modules/oraclebackend/oraclebackend.cc +++ b/modules/oraclebackend/oraclebackend.cc @@ -984,8 +984,8 @@ bool OracleBackend::get (DNSResourceRecord &rr) check_indicator(mResultNameInd, false); check_indicator(mResultTTLInd, false); - check_indicator(mResultTypeInd, false); - check_indicator(mResultContentInd, false); + check_indicator(mResultTypeInd, true); + check_indicator(mResultContentInd, true); check_indicator(mResultZoneIdInd, false); check_indicator(mResultLastChangeInd, false); if (d_dnssecQueries) diff --git a/modules/oraclebackend/schema.oracle.sql b/modules/oraclebackend/schema.oracle.sql index 471e080920..39cca8f29b 100644 --- a/modules/oraclebackend/schema.oracle.sql +++ b/modules/oraclebackend/schema.oracle.sql @@ -122,8 +122,9 @@ CREATE TABLE Records ( CONSTRAINT chk_records_type CHECK (type = upper(type)), CONSTRAINT unq_records_zntc UNIQUE (zone_id, fqdn, type, content), CONSTRAINT chk_records_tc CHECK ( - type IS NULL AND content IS NULL OR - type IS NOT NULL AND content IS NOT NULL + content IS NOT NULL OR + type IN('NS', 'CNAME') OR + type IS NULL ), CONSTRAINT chk_records_auth CHECK (auth IN (0, 1)) );