Add UNIQUE index fails with duplicate entry error, but no duplicates found
There is no guarantee that the valueaaaaaaaaaaaaaaa-11111 in the message

[23000][1062] Duplicate entry 'aaaaaaaaaaaaaaa-11111' for key 'mykey'


is the value that actually causes the violation. Seems to be a bug in MariaDB and in MySQL.