]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] quote table names
authorEvan Hunt <each@isc.org>
Thu, 2 May 2013 14:38:49 +0000 (07:38 -0700)
committerEvan Hunt <each@isc.org>
Thu, 2 May 2013 14:38:49 +0000 (07:38 -0700)
3563. [contrib] zone2sqlite failed with some table names. [RT #33375]

CHANGES
contrib/sdb/sqlite/zone2sqlite.c

diff --git a/CHANGES b/CHANGES
index 8f5c44c628b3f386522e33ab8a8e18cf3f6d328c..5be72cdba451d369303a45577f41e2e2a4bc8b83 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3563.  [contrib]       zone2sqlite failed with some table names. [RT #33375]
+
 3562.  [func]          Update map file header format to include a SHA-1 hash
                        of the database content, so that corrupted map files
                        can be rejected at load time. [RT #32459]
index b583d2bb0306a1c5d44cbd2507f6c98639e6f1a8..7b9260a25047704f94a8fe674df49b218843b6d7 100644 (file)
@@ -129,7 +129,7 @@ addrdata(dns_name_t *name, dns_ttl_t ttl, dns_rdata_t *rdata)
     dataarray[isc_buffer_usedlength(&b)] = 0;
     
     sql = sqlite3_mprintf(
-       "INSERT INTO %q (NAME, TTL, RDTYPE, RDATA)"
+       "INSERT INTO %Q (NAME, TTL, RDTYPE, RDATA)"
        " VALUES ('%q', %d, '%q', '%q') ",
        dbi.table,
        namearray, ttl, typearray, dataarray);
@@ -208,7 +208,7 @@ main(int argc, char *argv[])
        closeandexit(1);
     }
     
-    sql = sqlite3_mprintf("DROP TABLE %q ", dbi.table);
+    sql = sqlite3_mprintf("DROP TABLE %Q ", dbi.table);
     printf("%s\n", sql);
     res = sqlite3_exec(dbi.db, sql, NULL, NULL, &errmsg);
     sqlite3_free(sql);
@@ -231,7 +231,7 @@ main(int argc, char *argv[])
 #endif
     
     sql = sqlite3_mprintf(
-       "CREATE TABLE %q "
+       "CREATE TABLE %Q "
        "(NAME TEXT, TTL INTEGER, RDTYPE TEXT, RDATA TEXT) ",
        dbi.table);
     printf("%s\n", sql);