]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth gmysql: use table alias name in ORDER BY
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 18 Jul 2024 11:07:11 +0000 (13:07 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 25 Jul 2024 12:42:19 +0000 (14:42 +0200)
(cherry picked from commit 7a8ca8c13b2e8e6627eef2fd7281f99d0e86c80b)

modules/gmysqlbackend/gmysqlbackend.cc

index 890609d0692d063fc30366d3b1facc3518d7f3a0..b49479dc181cb6c306e9c7f5d3c2874e71d1df42 100644 (file)
@@ -132,7 +132,7 @@ public:
     declare(suffix, "update-account-query", "", "update domains set account=? where name=?");
     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, "info-all-primary-query", "", "select d.id, d.name, d.type, d.notified_serial,d.options, d.catalog,r.content from records r join domains d on r.domain_id=d.id and r.name=d.name where r.type='SOA' and r.disabled=0 and d.type in ('MASTER', 'PRODUCER') order by domains.id");
+    declare(suffix, "info-all-primary-query", "", "select d.id, d.name, d.type, d.notified_serial,d.options, d.catalog,r.content from records r join domains d on r.domain_id=d.id and r.name=d.name where r.type='SOA' and r.disabled=0 and d.type in ('MASTER', 'PRODUCER') order by d.id");
     declare(suffix, "info-producer-members-query", "", "select domains.id, domains.name, domains.options from records join domains on records.domain_id=domains.id and records.name=domains.name where domains.type='MASTER' and domains.catalog=? and records.type='SOA' and records.disabled=0");
     declare(suffix, "info-consumer-members-query", "", "select id, name, options, master from domains where type='SLAVE' and catalog=?");
     declare(suffix, "delete-domain-query", "", "delete from domains where name=?");