From: Aki Tuomi Date: Wed, 5 Aug 2015 16:22:27 +0000 (+0300) Subject: Add search records/comments to gMySQL backend X-Git-Tag: auth-3.4.6~10^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cc7fc05b803b7c918ab2b2cc6c0cbb7d6e180b7;p=pdns Add search records/comments to gMySQL backend --- diff --git a/modules/gmysqlbackend/gmysqlbackend.cc b/modules/gmysqlbackend/gmysqlbackend.cc index 66da8041f..499909204 100644 --- a/modules/gmysqlbackend/gmysqlbackend.cc +++ b/modules/gmysqlbackend/gmysqlbackend.cc @@ -124,6 +124,9 @@ public: declare(suffix, "insert-comment-query", "", "INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (%d, '%s', '%s', %d, '%s', '%s')"); declare(suffix, "delete-comment-rrset-query", "", "DELETE FROM comments WHERE domain_id=%d AND name='%s' AND type='%s'"); declare(suffix, "delete-comments-query", "", "DELETE FROM comments WHERE domain_id=%d"); + + declare(suffix, "search-records-query", "", record_query+" name LIKE '%s' OR content LIKE '%s' LIMIT %d"); + declare(suffix, "search-comments-query", "", "SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE name LIKE '%s' OR comment LIKE '%s' LIMIT %d"); } DNSBackend *make(const string &suffix="")