From: Kees Monshouwer Date: Tue, 2 Jun 2015 06:43:52 +0000 (+0200) Subject: all gsql backends are alive X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~21^2~5^2~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eafe72baca970009a570efc4d0cddc7d80978e6b;p=thirdparty%2Fpdns.git all gsql backends are alive --- diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index e764930010..8d981ef558 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -117,9 +117,6 @@ public: d_paridx++; return this; } - SSqlStatement* bind(const string& name, const DNSName& value) { - return bind(name, stripDot(value.toString())); // FIXME toLower() ? - } SSqlStatement* bindNull(const string& name) { if (d_paridx >= d_parnum) throw SSqlException("Attempt to bind more parameters than query has: " + d_query); diff --git a/pdns/backends/gsql/ssql.hh b/pdns/backends/gsql/ssql.hh index 955bc1f796..08d7639589 100644 --- a/pdns/backends/gsql/ssql.hh +++ b/pdns/backends/gsql/ssql.hh @@ -11,9 +11,10 @@ #include #include -#include "../../namespaces.hh" #include #include "../../dnsname.hh" +#include "../../namespaces.hh" +#include "../../misc.hh" class SSqlException { @@ -45,7 +46,9 @@ public: virtual SSqlStatement* bind(const string& name, long long value)=0;; virtual SSqlStatement* bind(const string& name, unsigned long long value)=0; virtual SSqlStatement* bind(const string& name, const std::string& value)=0; - virtual SSqlStatement* bind(const string& name, const DNSName& value)=0; + SSqlStatement* bind(const string& name, const DNSName& value) { + return bind(name, stripDot(value.toString())); + } virtual SSqlStatement* bindNull(const string& name)=0; virtual SSqlStatement* execute()=0;; virtual bool hasNextRow()=0;