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

def _detect_collations(self, connection):

    collations = {}
    if (self.server_version_info < (4, 1, 0)):
        pass
    else:
        charset = self._connection_charset
        rs = connection.execute('SHOW    COLLATION')
        for row in self._compat_fetchall(rs, charset):
            collations[row[0]] = row[1]
    return collations
