From: Benjamin Zengin Date: Tue, 5 Jul 2016 09:48:52 +0000 (+0200) Subject: Implements 'return id of added key' for gmysql X-Git-Tag: dnsdist-1.1.0-beta2~136^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68cc1e2729ccf27c7f172671d44d177212819809;p=thirdparty%2Fpdns.git Implements 'return id of added key' for gmysql --- diff --git a/modules/gmysqlbackend/gmysqlbackend.cc b/modules/gmysqlbackend/gmysqlbackend.cc index 17ba43fa7e..1be4e1e5da 100644 --- a/modules/gmysqlbackend/gmysqlbackend.cc +++ b/modules/gmysqlbackend/gmysqlbackend.cc @@ -126,6 +126,7 @@ public: 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,"get-last-inserted-key-id-query", "", "select LAST_INSERT_ID()"); declare(suffix,"list-domain-keys-query","", "select cryptokeys.id, flags, active, 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-domain-metadata-query","", "select content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=? and domainmetadata.kind=?");