From: Kees Monshouwer Date: Thu, 9 Jan 2014 13:30:49 +0000 (+0100) Subject: add oracle backend mode to zone2sql X-Git-Tag: rec-3.6.0-rc1~254^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d10c598564e981bb10761f8e5825f012c81bde9a;p=pdns add oracle backend mode to zone2sql --- diff --git a/pdns/zone2sql.cc b/pdns/zone2sql.cc index 1019fc020..3d5546071 100644 --- a/pdns/zone2sql.cc +++ b/pdns/zone2sql.cc @@ -47,7 +47,7 @@ StatBag S; static bool g_doDNSSEC; -enum dbmode_t {MYSQL, ORACLE, POSTGRES, SQLITE, MYDNS}; +enum dbmode_t {MYSQL, GORACLE, POSTGRES, SQLITE, MYDNS, ORACLE}; static dbmode_t g_mode; static bool g_intransaction; static int g_numRecords; @@ -68,7 +68,7 @@ static string stripDotContent(const string& content) static string sqlstr(const string &name) { - if(g_mode == SQLITE || g_mode==ORACLE) + if(g_mode == SQLITE || g_mode==GORACLE || g_mode==ORACLE) return "'"+boost::replace_all_copy(name, "'", "''")+"'"; string a; @@ -104,7 +104,7 @@ static void startNewTransaction() if(g_mode == MYSQL || g_mode == MYDNS) cout<<"BEGIN;"< *masters = 0) if(g_mode==POSTGRES || g_mode==MYSQL || g_mode==SQLITE) { cout<<"insert into domains (name,type) values ("< *masters = 0) else cout<<"insert into domains (name,type,master) values ("<