]> granicus.if.org Git - pdns/commitdiff
attach comments to qname, not zonename
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Tue, 6 May 2014 10:28:27 +0000 (12:28 +0200)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Tue, 6 May 2014 10:28:38 +0000 (12:28 +0200)
pdns/zone2sql.cc

index 78d1d9c87a440b2bce9b99ddb826b43c43aedbcf..bd1abb6bd642d8c4c73c7ff84888d2bfef04c9d4 100644 (file)
@@ -190,7 +190,7 @@ static void emitRecord(const string& zoneName, const string &qname, const string
         " from domains where name="<<toLower(sqlstr(zoneName))<<";\n";
 
       if(!recordcomment.empty()) {
-        cout<<"insert into comments (domain_id,name,type,modified_at, comment) select id, "<<toLower(sqlstr(zoneName))<<", "<<sqlstr(qtype)<<", "<<time(0)<<", "<<sqlstr(recordcomment)<<" from domains where name="<<toLower(sqlstr(zoneName))<<";\n";
+        cout<<"insert into comments (domain_id,name,type,modified_at, comment) select id, "<<toLower(sqlstr(stripDot(qname)))<<", "<<sqlstr(qtype)<<", "<<time(0)<<", "<<sqlstr(recordcomment)<<" from domains where name="<<toLower(sqlstr(zoneName))<<";\n";
        
       }