Mapper: use md5 hashes for database indexes

indexing the full path exeeds the maximum index length for MySQL

@DeepDiver1975