mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 15:39:59 -04:00
[v9_9] quote table names
3563. [contrib] zone2sqlite failed with some table names. [RT #33375]
(cherry picked from commit 96a1161785)
This commit is contained in:
parent
8da711c26c
commit
ed0d1d96c1
2 changed files with 5 additions and 3 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
3563. [contrib] zone2sqlite failed with some table names. [RT #33375]
|
||||
|
||||
3561. [bug] dig: issue a warning if an EDNS query returns FORMERR
|
||||
or NOTIMP. Adjust usage message. [RT #33363]
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue