 the LIKE pattern-matching operator, which takes
into account trailing spaces.

If a unique index consists of a column where trailing pad characters are
stripped or ignored, inserts into that column where values differ only by the
number of trailing pad characters will result in a duplicate-key error.

Examples
--------

Trailing spaces:

CREATE TABLE strtest (c CHAR(10));
INSERT INTO strtest VALUES('Maria   ');

SELECT c='Maria',c='Maria   ' FROM strtest;
+-----------+--------------+
| c='Maria' | c='Maria   ' |
+-----------+--------------+
|         1 |            1 |
+-----------+--------------+

SELECT c LIKE 'Maria',c LIKE 'Maria   ' FROM strtest;
+----------------+-------------------+
| c LIKE 'Maria' | c LIKE 'Maria   ' |
+----------------+-------------------+
|              1 |                 0 |
+----------------+-------------------+

NO PAD Collations
-----------------

NO PAD collations regard trailing spaces as normal characters. You can get a
list of all NO PAD collations by querying the Information Schema Collations
table, for example:

SELECT collation_name FROM information_schema.collations 
 WHERE collation_name LIKE "%nopad%";
+------------------------------+
| collation_name               |
+------------------------------+
| big5_chinese_nopad_ci        |
| big5_nopad_bin               |
...

URL: https://mariadb.com/kb/en/char/https://mariadb.com/kb/en/char/