'Pull the active COLLATIONS list from the server.
Cached per-connection.'

def _detect_collations(self, connection):

    collations = {}
    charset = self._connection_charset
    rs = connection.execute('SELECT    CHARACTER_SET_NAME,    COLLATION_NAME    FROM    data_dictionary.COLLATIONS')
    for row in self._compat_fetchall(rs, charset):
        collations[row[0]] = row[1]
    return collations
