Commit 96a11617 authored by Evan Hunt's avatar Evan Hunt
Browse files

[master] quote table names

3563.	[contrib]	zone2sqlite failed with some table names. [RT #33375]
parent 03b5d268
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]
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment