<div dir="ltr"><div>I think this is happening because I set UTF-8 as the default collation on my MySQL server, since most apps these days use UTF-8:</div><div><br></div><div><span style="font-family:monospace">character-set-server  = utf8mb4<br>collation-server      = utf8mb4_general_ci</span></div><div><br></div><div>If PowerDNS relies on the character set being explicitly set to latin1 and breaks when other character sets (such as UTF-8) are set as the default collation on the server, it should explicitly set the character set used by the connection to the MySQL server by executing <span style="font-family:monospace">SET NAMES 'latin1'</span> after connecting but before executing any 'real' queries. This seems like a bug in PowerDNS.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 24, 2020 at 7:47 PM Daniel Lo Nigro <<a href="mailto:lists@d.sb">lists@d.sb</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hey Jorge, did you end up resolving this issue? I'm seeing the same error, but only on one of my five servers:</div><div><span style="font-family:monospace"><br></span></div><span style="font-family:monospace">pdns_server[599055]: Backend error: GSQLBackend unable to find before/after (after) for domain_id 8 and qname 'n7': Could not execute mysql statement: select ordername from records where ordername > ? and domain_id=? and disabled=0 and ordername is not null order by 1 asc limit 1: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '>'</span><div><br></div><div>Collation on the ordername looks fine (<span style="font-family:monospace">CHARACTER SET latin1 COLLATE latin1_bin</span>), and if I run the same query in the MySQL CLI it also works fine:</div><div><br></div><span style="font-family:monospace">mysql> select ordername from records where ordername > 'n7' and domain_id=8 and disabled=0 and ordername is not null order by 1 asc limit 1;<br>+-----------+<br>| ordername |<br>+-----------+<br>| ns1       |<br>+-----------+<br>1 row in set (0.00 sec)</span><div><br></div><div>The schema is identical across all replicas so I'm confused as to why only one of them is throwing these errors.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Thanks,</div><div>Daniel<br></div></div>
</blockquote></div>