On Mon, Sep 03, 2012 at 07:19:45PM +0200, Peter van Dijk wrote:
> Hello,
> 
> we are working hard to get 3.1.1 out the door, fixing the last remaining 
> DNSSEC issues. Since 3.1, we have discovered two issues that require some 
> re-engineering and may have database impact. We could really use some input 
> on these issues.
> 
> 
> ISSUE 1: ordername sorting
> 
[snip]
> 
> MySQL, depending on charset settings (cannot reproduce right now), will also 
> not do the right thing for us. However, for MySQL there are a few reliable 
> workarounds:
> ALTER TABLE records ADD order name      VARCHAR(255) COLLATE latin1_bin;
> or
> ALTER TABLE records ADD order name      VARBINARY(255);
> 
> Both of these will make order name sort correctly - the first one applies 
> when latin1 is already active, the second one is generic.
> 
> SQLite mostly seems to do the right thing, at least with default settings.
> 
> OUR QUESTIONS:
> 1b. Is VARBINARY the best way to do it for MySQL?

Afaik you want only to have the ordering (collation) to be binary. So you have 
some ways to do it without touching the character set.
1. SELECT .. ORDER BY BINARY
   Just change the Query
2. ALTER TABLE records ADD order name      VARCHAR(255) BINARY
   Then you don't care about the CHARSET used by the server. 
   This syntax always set the binary collation specific for that charset

Regards
Erkan


-- 
über den grenzen muß die freiheit wohl wolkenlos sein
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to