maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #03432
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
-
Collations, trailing spaces and unique indexes
From: Binarus, 2016-03-11
-
Re: Collations, trailing spaces and unique indexes
From: Rhys.Campbell, 2016-03-11
-
Re: Collations, trailing spaces and unique indexes
From: Binarus, 2016-03-11
-
Re: Collations, trailing spaces and unique indexes
From: Rhys.Campbell, 2016-03-11
-
Re: Collations, trailing spaces and unique indexes
From: Peter Laursen, 2016-03-11