Permalink
Browse files

oraclebackend: fix records pointing at root

  • Loading branch information...
1 parent bbcbbbe commit 96963e2938417d75e01963683a57a92ed7a1833f @mind04 mind04 committed with mind04 Dec 14, 2014
Showing with 5 additions and 4 deletions.
  1. +2 −2 modules/oraclebackend/oraclebackend.cc
  2. +3 −2 modules/oraclebackend/schema.oracle.sql
@@ -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)
@@ -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))
);

0 comments on commit 96963e2

Please sign in to comment.