From 53fe3b882a8997e10cf89166c09d67ddd2f90fea Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sun, 8 Feb 2015 20:11:21 +0100 Subject: [PATCH] insert-zone-query: Undo addition of account field We don't actually need this, and we didn't bind any value to :account. --- modules/gmysqlbackend/gmysqlbackend.cc | 2 +- modules/gpgsqlbackend/gpgsqlbackend.cc | 2 +- modules/gsqlite3backend/gsqlite3backend.cc | 2 +- pdns/backends/gsql/gsqlbackend.hh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gmysqlbackend/gmysqlbackend.cc b/modules/gmysqlbackend/gmysqlbackend.cc index 793ade9afa..5485b4b853 100644 --- a/modules/gmysqlbackend/gmysqlbackend.cc +++ b/modules/gmysqlbackend/gmysqlbackend.cc @@ -72,7 +72,7 @@ public: declare(suffix,"supermaster-query","", "select account from supermasters where ip=? and nameserver=?"); declare(suffix,"supermaster-name-to-ips", "", "select ip,account from supermasters where nameserver=? and account=?"); - declare(suffix,"insert-zone-query","", "insert into domains (type,name,account) values('NATIVE',?,?)"); + declare(suffix,"insert-zone-query","", "insert into domains (type,name) values('NATIVE',?)"); declare(suffix,"insert-slave-query","", "insert into domains (type,name,master,account) values('SLAVE',?,?,?)"); declare(suffix, "insert-record-query", "", "insert into records (content,ttl,prio,type,domain_id,disabled,name,auth) values (?,?,?,?,?,?,?,?)"); diff --git a/modules/gpgsqlbackend/gpgsqlbackend.cc b/modules/gpgsqlbackend/gpgsqlbackend.cc index 74b6e05184..75c9a95477 100644 --- a/modules/gpgsqlbackend/gpgsqlbackend.cc +++ b/modules/gpgsqlbackend/gpgsqlbackend.cc @@ -66,7 +66,7 @@ public: declare(suffix,"supermaster-query","", "select account from supermasters where ip=$1 and nameserver=$2"); declare(suffix,"supermaster-name-to-ips", "", "select ip,account from supermasters where nameserver=$1 and account=$2"); - declare(suffix,"insert-zone-query","", "insert into domains (type,name,account) values('NATIVE',$1,$2)"); + declare(suffix,"insert-zone-query","", "insert into domains (type,name) values('NATIVE',$1)"); declare(suffix,"insert-slave-query","", "insert into domains (type,name,master,account) values('SLAVE',$1,$2,$3)"); declare(suffix, "insert-record-query", "", "insert into records (content,ttl,prio,type,domain_id,disabled,name,auth) values ($1,$2,$3,$4,$5,$6,$7,$8)"); diff --git a/modules/gsqlite3backend/gsqlite3backend.cc b/modules/gsqlite3backend/gsqlite3backend.cc index 3c87262064..7a03716b88 100644 --- a/modules/gsqlite3backend/gsqlite3backend.cc +++ b/modules/gsqlite3backend/gsqlite3backend.cc @@ -83,7 +83,7 @@ public: declare(suffix, "supermaster-query", "", "select account from supermasters where ip=:ip and nameserver=:nameserver"); declare(suffix, "supermaster-name-to-ips", "", "select ip,account from supermasters where nameserver=:nameserver and account=:account"); - declare(suffix, "insert-zone-query", "", "insert into domains (type,name,account) values('NATIVE',:domain,:account)"); + declare(suffix, "insert-zone-query", "", "insert into domains (type,name) values('NATIVE',:domain)"); declare(suffix, "insert-slave-query", "", "insert into domains (type,name,master,account) values('SLAVE',:domain,:masters,:account)"); declare(suffix, "insert-record-query", "", "insert into records (content,ttl,prio,type,domain_id,disabled,name,auth) values (:content,:ttl,:priority,:qtype,:domain_id,:disabled,:qname,:auth)"); diff --git a/pdns/backends/gsql/gsqlbackend.hh b/pdns/backends/gsql/gsqlbackend.hh index b2e8d0fec1..7e59e34576 100644 --- a/pdns/backends/gsql/gsqlbackend.hh +++ b/pdns/backends/gsql/gsqlbackend.hh @@ -39,7 +39,7 @@ public: d_InfoOfAllSlaveDomainsQuery_stmt = d_db->prepare(d_InfoOfAllSlaveDomainsQuery, 0); d_SuperMasterInfoQuery_stmt = d_db->prepare(d_SuperMasterInfoQuery, 2); d_GetSuperMasterIPs_stmt = d_db->prepare(d_GetSuperMasterIPs, 2); - d_InsertZoneQuery_stmt = d_db->prepare(d_InsertZoneQuery, 2); + d_InsertZoneQuery_stmt = d_db->prepare(d_InsertZoneQuery, 1); d_InsertSlaveZoneQuery_stmt = d_db->prepare(d_InsertSlaveZoneQuery, 3); d_InsertRecordQuery_stmt = d_db->prepare(d_InsertRecordQuery, 8); d_InsertEntQuery_stmt = d_db->prepare(d_InsertEntQuery, 3); -- 2.47.2