List:Falcon Storage Engine« Previous MessageNext Message »
From:Lars-Erik Bjørk Date:December 5 2008 8:56am
Subject:Re: Please review fox for bug#34479
View as plain text  
On Thu, 2008-12-04 at 11:16 -0500, Ann W. Harrison wrote:
> Lars-Erik,
> > 
> > The trailing spaces (and minimum sort characters) I have been removing
> > so far, I have converted to the given character set, so for f.eks UCS2,
> > I have been looking to remove 0x0020, etc
> 
> Whatever the representation for spaces is, that's what we can safely
> remove.  Everything else stays.
> > 
> > Should it be done like this for trailing zeros as well, so that I in the
> > case of ucs2 should be looking to remove 0x0000?
> > 
> 
> No - we remove trailings zeros on numeric keys only.  Happily they
> don't have collations.
> 
> 

Aha! Good to hear, the old implementation of
MySQLCollation::computeLength was checking for zeroes, padChars and
minSortChars:

static inline uint computeKeyLength (uint length, const char *key,
char padChar, char minSortChar)
{
for (const char *p = key + length; p > key; --p)
	if ((p[-1] != 0) && (p[-1] != padChar) && (p[-1] !=minSortChar))
		return (uint) (p - key);
return 0;
}


/Lars-Erik

> Cheers,
> 
> Ann
> 

Thread
Please review fox for bug#34479Lars-Erik Bjørk2 Dec
  • RE: Please review fox for bug#34479Vladislav Vaintroub2 Dec
    • RE: Please review fox for bug#34479Lars-Erik Bjørk2 Dec
      • RE: Please review fox for bug#34479Lars-Erik Bjørk2 Dec
        • Re: Please review fox for bug#34479Alexander Barkov3 Dec
          • Re: Please review fox for bug#34479Lars-Erik Bjørk3 Dec
            • Re: Please review fox for bug#34479Kevin Lewis3 Dec
              • Re: Please review fox for bug#34479Ann W. Harrison3 Dec
    • Re: Please review fox for bug#34479Ann W. Harrison2 Dec
      • RE: Please review fox for bug#34479Vladislav Vaintroub2 Dec
Re: Please review fox for bug#34479Kevin Lewis3 Dec
  • Re: Please review fox for bug#34479Alexander Barkov3 Dec
    • Re: Please review fox for bug#34479Ann W. Harrison3 Dec
      • Re: Please review fox for bug#34479Lars-Erik Bjørk4 Dec
        • RE: Please review fox for bug#34479Vladislav Vaintroub4 Dec
        • Re: Please review fox for bug#34479Lars-Erik Bjørk4 Dec
          • RE: Please review fox for bug#34479Vladislav Vaintroub4 Dec
          • Re: Please review fox for bug#34479Ann W. Harrison4 Dec
        • Re: Please review fox for bug#34479Ann W. Harrison4 Dec
          • Re: Please review fox for bug#34479Lars-Erik Bjørk5 Dec
            • Re: Please review fox for bug#34479Lars-Erik Bjørk5 Dec
        • Re: Please review fox for bug#34479Alexander Barkov8 Dec
          • RE: Please review fox for bug#34479Vladislav Vaintroub8 Dec
            • Re: Please review fox for bug#34479Alexander Barkov8 Dec
            • Re: Please review fox for bug#34479Ann W. Harrison8 Dec
Re: Please review fox for bug#34479Ann W. Harrison4 Dec