]> 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, 18 Jul 2024 11:07:11 +0000 (13:07 +0200)
modules/gmysqlbackend/gmysqlbackend.cc

index 676164c9693306b03e29e67d28806102bb35f0e8..77c2fcd1b80a16ce74e3560c78455d0e5740f171 100644 (file)
@@ -131,7 +131,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=?");