For columns are already included in a compound index there is no
benefit to having a separate index with a subset of the same columns in
the same order, it just wastes space.
Previously to check if hibernated room was old enough we had to fetch info
about all rooms from database. Now we repurpose created_at field in sql
to store that info, that allow us to have more efficient query just for it.
* Fix specified key was too long
This adds the correct engine and sets it to utf8mb4 collate. Prevents "Specified key was too long; max key length is 1000 bytes" from happening.
* Make two import SQL files consistent
As suggested by @prefiks
Indexes are done only on 191 byte slice of that (to fit in index limits),
and since server_host could theoretically be bigger this causes mysql
engine don't use indexes in full potential.
Note that support for older specification is completely dropped,
i.e. no backward compatibility is provided since the XEPs are
still very experimental and being changed drastically
Accordingly, Mnesia/SQL/Riak table 'carboncopy' is not used anymore
and can be safely removed.
As a consequence, the commit deprecates the following options of
mod_carboncopy:
- ram_db_type
- use_cache
- cache_size
- cache_missed
- cache_life_time
Fixes#2663