"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/godbcbackend/godbcbackend.cc" between
pdns-auth-4.1.13.tar.gz and pdns-auth-4.2.0.tar.gz

About: PowerDNS Authoritative Nameserver is a versatile nameserver which supports a large number of backends (that can either be plain zone files or be more dynamic in nature).

godbcbackend.cc  (pdns-auth-4.1.13):godbcbackend.cc  (pdns-auth-4.2.0)
skipping to change at line 45 skipping to change at line 45
// Connects to the database. // Connects to the database.
gODBCBackend::gODBCBackend (const std::string & mode, const std::string & suffix ) : GSQLBackend( mode, suffix ) gODBCBackend::gODBCBackend (const std::string & mode, const std::string & suffix ) : GSQLBackend( mode, suffix )
{ {
try try
{ {
setDB( new SODBC( getArg( "datasource" ), getArg( "username" ), getArg( "pas sword" ))); setDB( new SODBC( getArg( "datasource" ), getArg( "username" ), getArg( "pas sword" )));
} }
catch( SSqlException & e ) catch( SSqlException & e )
{ {
L<<Logger::Error<< mode << " Connection failed: " << e.txtReason() << std::e ndl; g_log<<Logger::Error<< mode << " Connection failed: " << e.txtReason() << st d::endl;
throw PDNSException( "Unable to launch " + mode + " connection: " + e.txtRea son()); throw PDNSException( "Unable to launch " + mode + " connection: " + e.txtRea son());
} }
L << Logger::Warning << mode << " Connection successful" << std::endl; g_log << Logger::Warning << mode << " Connection successful" << std::endl;
} }
//! Constructs a gODBCBackend //! Constructs a gODBCBackend
class gODBCFactory : public BackendFactory class gODBCFactory : public BackendFactory
{ {
public: public:
//! Constructor. //! Constructor.
gODBCFactory( const std::string & mode ) : BackendFactory( mode ), d_mode( mod e ) gODBCFactory( const std::string & mode ) : BackendFactory( mode ), d_mode( mod e )
{ {
} }
skipping to change at line 82 skipping to change at line 82
declare(suffix, "id-query", "Basic with ID query", record_query+" disabled=0 and type=? and name=? and domain_id=?"); declare(suffix, "id-query", "Basic with ID query", record_query+" disabled=0 and type=? and name=? and domain_id=?");
declare(suffix, "any-query", "Any query", record_query+" disabled=0 and name =?"); declare(suffix, "any-query", "Any query", record_query+" disabled=0 and name =?");
declare(suffix, "any-id-query", "Any with ID query", record_query+" disabled =0 and name=? and domain_id=?"); declare(suffix, "any-id-query", "Any with ID query", record_query+" disabled =0 and name=? and domain_id=?");
declare(suffix, "list-query", "AXFR query", record_query+" (disabled=0 OR di sabled=?) and domain_id=? order by name, type"); declare(suffix, "list-query", "AXFR query", record_query+" (disabled=0 OR di sabled=?) and domain_id=? order by name, type");
declare(suffix, "list-subzone-query", "Subzone listing", record_query+" disa bled=0 and (name=? OR name like ?) and domain_id=?"); declare(suffix, "list-subzone-query", "Subzone listing", record_query+" disa bled=0 and (name=? OR name like ?) and domain_id=?");
declare(suffix, "remove-empty-non-terminals-from-zone-query", "remove all em pty non-terminals from zone", "delete from records where domain_id=? and type is null"); declare(suffix, "remove-empty-non-terminals-from-zone-query", "remove all em pty non-terminals from zone", "delete from records where domain_id=? and type is null");
declare(suffix, "delete-empty-non-terminal-query", "delete empty non-termina l from zone", "delete from records where domain_id=? and name=? and type is null "); declare(suffix, "delete-empty-non-terminal-query", "delete empty non-termina l from zone", "delete from records where domain_id=? and name=? and type is null ");
declare(suffix,"master-zone-query","Data", "select master from domains where
name=? and type='SLAVE'");
declare(suffix,"info-zone-query","","select id,name,master,last_check,notifi ed_serial,type,account from domains where name=?"); declare(suffix,"info-zone-query","","select id,name,master,last_check,notifi ed_serial,type,account from domains where name=?");
declare(suffix,"info-all-slaves-query","","select id,name,master,last_check from domains where type='SLAVE'"); declare(suffix,"info-all-slaves-query","","select id,name,master,last_check from domains where type='SLAVE'");
declare(suffix,"supermaster-query","", "select account from supermasters whe re ip=? and nameserver=?"); declare(suffix,"supermaster-query","", "select account from supermasters whe re ip=? and nameserver=?");
declare(suffix,"supermaster-name-to-ips", "", "select ip,account from superm asters where nameserver=? and account=?"); declare(suffix,"supermaster-name-to-ips", "", "select ip,account from superm asters where nameserver=? and account=?");
declare(suffix,"insert-zone-query","", "insert into domains (type,name,maste r,account,last_check,notified_serial) values(?,?,?,?,null,null)"); declare(suffix,"insert-zone-query","", "insert into domains (type,name,maste r,account,last_check,notified_serial) values(?,?,?,?,null,null)");
declare(suffix, "insert-record-query", "", "insert into records (content,ttl declare(suffix, "insert-record-query", "", "insert into records (content,ttl
,prio,type,domain_id,disabled,name,ordername,auth,change_date) values (?,?,?,?,? ,prio,type,domain_id,disabled,name,ordername,auth) values (?,?,?,?,?,?,?,convert
,?,?,convert(varbinary(255),?),?,null)"); (varbinary(255),?),?)");
declare(suffix, "insert-empty-non-terminal-order-query", "insert empty non-t declare(suffix, "insert-empty-non-terminal-order-query", "insert empty non-t
erminal in zone", "insert into records (type,domain_id,disabled,name,ordername,a erminal in zone", "insert into records (type,domain_id,disabled,name,ordername,a
uth,ttl,prio,change_date,content) values (null,?,0,?,convert(varbinary(255),?),? uth,ttl,prio,content) values (null,?,0,?,convert(varbinary(255),?),?,null,null,n
,null,null,null,null)"); ull)");
declare(suffix, "get-order-first-query", "DNSSEC Ordering Query, first", "se lect top 1 convert(varchar(255), ordername) from records where domain_id=? and d isabled=0 and ordername is not null order by 1 asc"); declare(suffix, "get-order-first-query", "DNSSEC Ordering Query, first", "se lect top 1 convert(varchar(255), ordername) from records where domain_id=? and d isabled=0 and ordername is not null order by 1 asc");
declare(suffix, "get-order-before-query", "DNSSEC Ordering Query, before", " select top 1 convert(varchar(255), ordername), name from records where ordername <= convert(varbinary(255),?) and domain_id=? and disabled=0 and ordername is no t null order by 1 desc"); declare(suffix, "get-order-before-query", "DNSSEC Ordering Query, before", " select top 1 convert(varchar(255), ordername), name from records where ordername <= convert(varbinary(255),?) and domain_id=? and disabled=0 and ordername is no t null order by 1 desc");
declare(suffix, "get-order-after-query", "DNSSEC Ordering Query, after", "se lect convert(varchar(255), min(ordername)) from records where ordername > conver t(varbinary(255),?) and domain_id=? and disabled=0 and ordername is not null"); declare(suffix, "get-order-after-query", "DNSSEC Ordering Query, after", "se lect convert(varchar(255), min(ordername)) from records where ordername > conver t(varbinary(255),?) and domain_id=? and disabled=0 and ordername is not null");
declare(suffix, "get-order-last-query", "DNSSEC Ordering Query, last", "sele ct top 1 convert(varchar(255), ordername), name from records where ordername != convert(varbinary(255),'') and domain_id=? and disabled=0 and ordername is not n ull order by 1 desc"); declare(suffix, "get-order-last-query", "DNSSEC Ordering Query, last", "sele ct top 1 convert(varchar(255), ordername), name from records where ordername != convert(varbinary(255),'') and domain_id=? and disabled=0 and ordername is not n ull order by 1 desc");
declare(suffix, "update-ordername-and-auth-query", "DNSSEC update ordername and auth for a qname query", "update records set ordername=convert(varbinary(255 ),?),auth=? where domain_id=? and name=? and disabled=0"); declare(suffix, "update-ordername-and-auth-query", "DNSSEC update ordername and auth for a qname query", "update records set ordername=convert(varbinary(255 ),?),auth=? where domain_id=? and name=? and disabled=0");
declare(suffix, "update-ordername-and-auth-type-query", "DNSSEC update order name and auth for a rrset query", "update records set ordername=convert(varbinar y(255),?),auth=? where domain_id=? and name=? and type=? and disabled=0"); declare(suffix, "update-ordername-and-auth-type-query", "DNSSEC update order name and auth for a rrset query", "update records set ordername=convert(varbinar y(255),?),auth=? where domain_id=? and name=? and type=? and disabled=0");
declare(suffix, "nullify-ordername-and-update-auth-query", "DNSSEC nullify o rdername and update auth for a qname query", "update records set ordername=NULL, auth=? where domain_id=? and name=? and disabled=0"); declare(suffix, "nullify-ordername-and-update-auth-query", "DNSSEC nullify o rdername and update auth for a qname query", "update records set ordername=NULL, auth=? where domain_id=? and name=? and disabled=0");
declare(suffix, "nullify-ordername-and-update-auth-type-query", "DNSSEC null ify ordername and update auth for a rrset query", "update records set ordername= NULL,auth=? where domain_id=? and name=? and type=? and disabled=0"); declare(suffix, "nullify-ordername-and-update-auth-type-query", "DNSSEC null ify ordername and update auth for a rrset query", "update records set ordername= NULL,auth=? where domain_id=? and name=? and type=? and disabled=0");
declare(suffix,"update-master-query","", "update domains set master=? where name=?"); declare(suffix,"update-master-query","", "update domains set master=? where name=?");
declare(suffix,"update-kind-query","", "update domains set type=? where name =?"); declare(suffix,"update-kind-query","", "update domains set type=? where name =?");
declare(suffix,"update-account-query","", "update domains set account=? wher e name=?"); declare(suffix,"update-account-query","", "update domains set account=? wher e name=?");
declare(suffix,"update-serial-query","", "update domains set notified_serial =? where id=?"); declare(suffix,"update-serial-query","", "update domains set notified_serial =? where id=?");
declare(suffix,"update-lastcheck-query","", "update domains set last_check=? where id=?"); declare(suffix,"update-lastcheck-query","", "update domains set last_check=? where id=?");
declare(suffix,"zone-lastchange-query", "", "select max(change_date) from re declare(suffix,"info-all-master-query","", "select domains.id, domains.name,
cords where domain_id=?"); domains.notified_serial, records.content from records join domains on records.n
declare(suffix,"info-all-master-query","", "select id,name,master,last_check ame=domains.name where records.type='SOA' and records.disabled=0 and domains.typ
,notified_serial,type from domains where type='MASTER'"); e='MASTER'");
declare(suffix,"delete-domain-query","", "delete from domains where name=?") ; declare(suffix,"delete-domain-query","", "delete from domains where name=?") ;
declare(suffix,"delete-zone-query","", "delete from records where domain_id= ?"); declare(suffix,"delete-zone-query","", "delete from records where domain_id= ?");
declare(suffix,"delete-rrset-query","","delete from records where domain_id= ? and name=? and type=?"); declare(suffix,"delete-rrset-query","","delete from records where domain_id= ? and name=? and type=?");
declare(suffix,"delete-names-query","","delete from records where domain_id= ? and name=?"); declare(suffix,"delete-names-query","","delete from records where domain_id= ? and name=?");
declare(suffix,"add-domain-key-query","", "insert into cryptokeys (domain_id , flags, active, content) select id, ?, ?, ? from domains where name=?"); declare(suffix,"add-domain-key-query","", "insert into cryptokeys (domain_id , flags, active, content) select id, ?, ?, ? from domains where name=?");
declare(suffix,"get-last-inserted-key-id-query", "", "select ident_current(' cryptokeys')"); declare(suffix,"get-last-inserted-key-id-query", "", "select ident_current(' cryptokeys')");
declare(suffix,"list-domain-keys-query","", "select cryptokeys.id, flags, ac tive, content from domains, cryptokeys where cryptokeys.domain_id=domains.id and name=?"); declare(suffix,"list-domain-keys-query","", "select cryptokeys.id, flags, ac tive, content from domains, cryptokeys where cryptokeys.domain_id=domains.id and name=?");
declare(suffix,"get-all-domain-metadata-query","", "select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=?"); declare(suffix,"get-all-domain-metadata-query","", "select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=?");
declare(suffix,"get-domain-metadata-query","", "select content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=? and domainm etadata.kind=?"); declare(suffix,"get-domain-metadata-query","", "select content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=? and domainm etadata.kind=?");
skipping to change at line 165 skipping to change at line 162
}; };
//! Magic class that is activated when the dynamic library is loaded //! Magic class that is activated when the dynamic library is loaded
class gODBCLoader class gODBCLoader
{ {
public: public:
//! This reports us to the main UeberBackend class //! This reports us to the main UeberBackend class
gODBCLoader() gODBCLoader()
{ {
BackendMakers().report( new gODBCFactory("godbc")); BackendMakers().report( new gODBCFactory("godbc"));
L<<Logger::Warning << "This is module godbcbackend reporting" << std::endl; g_log<<Logger::Warning << "This is module godbcbackend reporting" << std::en dl;
} }
}; };
//! Reports the backendloader to the UeberBackend. //! Reports the backendloader to the UeberBackend.
static gODBCLoader godbcloader; static gODBCLoader godbcloader;
 End of changes. 6 change blocks. 
17 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)