]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
oraclebackend: fix records pointing at root 1955/head
authorKees Monshouwer <mind04@monshouwer.org>
Sun, 14 Dec 2014 23:07:35 +0000 (00:07 +0100)
committermind04 <mind04@monshouwer.org>
Sun, 14 Dec 2014 23:30:13 +0000 (00:30 +0100)
modules/oraclebackend/oraclebackend.cc
modules/oraclebackend/schema.oracle.sql

index 06728f5de45333ca571f05be7c2c79b6a890d3e4..7d2cdc450b4742691959ab10c9fbc2d9382fa41c 100644 (file)
@@ -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)
index 471e08092058bc664eb2bdd7cc0037a782ff3c24..39cca8f29bbeebcd8a51c734d9092b342b1f2125 100644 (file)
@@ -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))
 );