From: Kees Monshouwer Date: Thu, 24 Apr 2014 16:23:07 +0000 (+0200) Subject: comment is a reserved word in oracle X-Git-Tag: rec-3.6.0-rc1~40^2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=822fda9aa79cb40d7a601a6e282825ab47056c68;p=pdns comment is a reserved word in oracle --- diff --git a/modules/goraclebackend/goracle-schema.sql b/modules/goraclebackend/goracle-schema.sql index a65e2842c..4a0205dc7 100644 --- a/modules/goraclebackend/goracle-schema.sql +++ b/modules/goraclebackend/goracle-schema.sql @@ -49,7 +49,7 @@ CREATE TABLE comments ( type VARCHAR2(10) NOT NULL, modified_at INTEGER NOT NULL, account VARCHAR2(40) NOT NULL, - comment VARCHAR2(4000) NOT NULL + "comment" VARCHAR2(4000) NOT NULL ); CREATE SEQUENCE comments_id_sequence; CREATE INDEX comments$nametype ON comments (name, type); diff --git a/modules/goraclebackend/goraclebackend.cc b/modules/goraclebackend/goraclebackend.cc index 5815721d2..bfcd10965 100644 --- a/modules/goraclebackend/goraclebackend.cc +++ b/modules/goraclebackend/goraclebackend.cc @@ -126,8 +126,8 @@ public: declare(suffix, "get-all-domains-query", "Retrieve all domains", "select records.domain_id, records.name, records.content, domains.type, domains.master, domains.notified_serial, domains.last_check from records, domains where records.domain_id=domains.id and records.type='SOA' and (records.disabled=0 OR 1=%d)"); - declare(suffix, "list-comments-query", "", "SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE domain_id=%d"); - declare(suffix, "insert-comment-query", "", "INSERT INTO comments (id, domain_id, name, type, modified_at, account, comment) VALUES (comments_id_sequence.nextval, %d, '%s', '%s', %d, '%s', '%s')"); + declare(suffix, "list-comments-query", "", "SELECT domain_id,name,type,modified_at,account,\"comment\" FROM comments WHERE domain_id=%d"); + declare(suffix, "insert-comment-query", "", "INSERT INTO comments (id, domain_id, name, type, modified_at, account, \"comment\") VALUES (comments_id_sequence.nextval, %d, '%s', '%s', %d, '%s', '%s')"); declare(suffix, "delete-comment-rrset-query", "", "DELETE FROM comments WHERE domain_id=%d AND name='%s' AND type='%s'"); declare(suffix, "delete-comments-query", "", "DELETE FROM comments WHERE domain_id=%d"); }