← Back to team overview

maria-discuss team mailing list archive

Re: Collations, trailing spaces and unique indexes

 

On 11.03.2016 13:06, Peter Laursen wrote:
> An idea that may work for you could be to TRIM() - http://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_trim - the original varchar column into a virtual (PERSISTENT) column, and add an index on this column? 
> 
I'm not sure if I understand you correctly, but using TRIM() on that column would make the value 'a' the same as the value 'a ' which is exactly how MariaDB's indexes already work by default and the thing which I would like to avoid. Have I misunderstood something?

Regards,

Binarus




References