]> granicus.if.org Git - pdns/commitdiff
actually honour disabled (from json) during zone2sql for mysql or oracle
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Mon, 19 May 2014 11:24:14 +0000 (13:24 +0200)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Mon, 19 May 2014 11:24:24 +0000 (13:24 +0200)
pdns/zone2sql.cc

index bd1abb6bd642d8c4c73c7ff84888d2bfef04c9d4..e8670e2b125105c162d752625d6bfb9afe7e0008 100644 (file)
@@ -186,7 +186,7 @@ static void emitRecord(const string& zoneName, const string &qname, const string
       cout<<"insert into records (domain_id, name, type,content,ttl,prio,disabled) select id ,"<<
         sqlstr(toLower(stripDot(qname)))<<", "<<
         sqlstr(qtype)<<", "<<
-        sqlstr(stripDotContent(content))<<", "<<ttl<<", "<<prio<<", 0"<<
+        sqlstr(stripDotContent(content))<<", "<<ttl<<", "<<prio<<", "<<disabled<<
         " from domains where name="<<toLower(sqlstr(zoneName))<<";\n";
 
       if(!recordcomment.empty()) {
@@ -200,7 +200,7 @@ static void emitRecord(const string& zoneName, const string &qname, const string
         sqlstr(toLower(stripDot(qname)))<<", "<<
         sqlstr(toLower(labelReverse(makeRelative(stripDot(qname), zoneName))))<<", "<<auth<<", "<<
         sqlstr(qtype)<<", "<<
-        sqlstr(stripDotContent(content))<<", "<<ttl<<", "<<prio<<", 0"<<
+        sqlstr(stripDotContent(content))<<", "<<ttl<<", "<<prio<<", "<<disabled<<
         " from domains where name="<<toLower(sqlstr(zoneName))<<";\n";
     }
   }
@@ -225,7 +225,7 @@ static void emitRecord(const string& zoneName, const string &qname, const string
     cout<<"insert into Records (id, domain_id, name, type, content, ttl, prio, disabled) select RECORDS_ID_SEQUENCE.nextval,id ,"<<
       sqlstr(toLower(stripDot(qname)))<<", "<<
       sqlstr(qtype)<<", "<<
-      sqlstr(stripDotContent(content))<<", "<<ttl<<", "<<prio<<", 0"
+      sqlstr(stripDotContent(content))<<", "<<ttl<<", "<<prio<<", "<<disabled<<
       " from Domains where name="<<toLower(sqlstr(zoneName))<<";\n";
   }
   else if(g_mode==ORACLE) {