BIND 10 trac1782, updated. 3057455dd008c612f64fd265a957bdf9c0b58679 [1782] Include the NSEC3 namespace in the iterator

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Apr 13 12:16:55 UTC 2012


The branch, trac1782 has been updated
       via  3057455dd008c612f64fd265a957bdf9c0b58679 (commit)
      from  65193e8384b25f0092177adb91a8ee6c2679d2db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3057455dd008c612f64fd265a957bdf9c0b58679
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Fri Apr 13 14:14:58 2012 +0200

    [1782] Include the NSEC3 namespace in the iterator
    
    It is included using the UNION SQL statement to concatenate the tables
    together. The ordering is little bit of a hack. We could order by name,
    but that would not be much better and a lot of tests would need to be
    modified. Also, the NSEC3 sigtype is hardcoded for the NSEC3 namespace,
    as there can be no other signature.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/sqlite3_accessor.cc |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/sqlite3_accessor.cc b/src/lib/datasrc/sqlite3_accessor.cc
index 11f364e..0214762 100644
--- a/src/lib/datasrc/sqlite3_accessor.cc
+++ b/src/lib/datasrc/sqlite3_accessor.cc
@@ -93,8 +93,19 @@ const char* const text_statements[NUM_STATEMENTS] = {
         "VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)",
     "DELETE FROM records WHERE zone_id=?1 AND name=?2 " // DEL_RECORD
         "AND rdtype=?3 AND rdata=?4",
-    "SELECT rdtype, ttl, sigtype, rdata, name FROM records " // ITERATE
-        "WHERE zone_id = ?1 ORDER BY rname, rdtype",
+    // The following iterates the whole zone. As the NSEC3 records
+    // (and corresponding RRSIGs) live in separate table, we need to
+    // take both of them. As the RRSIGs are for NSEC3s in the other
+    // table, we can easily hardcode the sigtype.
+    //
+    // The extra column is so we can order it by rname. This is to
+    // preserve the previous order, mostly for tests.
+    // TODO: Is it possible to get rid of the ordering?
+    "SELECT rdtype, ttl, sigtype, rdata, name, rname FROM records " // ITERATE
+        "WHERE zone_id = ?1 "
+        "UNION "
+        "SELECT rdtype, ttl, \"NSEC3\", rdata, owner, owner FROM nsec3 "
+        "WHERE zone_id = ?1 ORDER by rname, rdtype",
     /*
      * This one looks for previous name with NSEC record. It is done by
      * using the reversed name. The NSEC is checked because we need to



More information about the bind10-changes mailing list