GROUP_CONCAT column size limit in Mysql is too low

Mysql has fairly low limit for rows that can be merged by the GROUP_CONCAT function. For large result sets, this has to be increased. This can be done with the following SQL statement, which can be executed in open_db_connection.:

def open_db_connection(self):
    conn = MySQLdb.connect(....)
    cursor = conn.cursor()

    cursor.execute('SET SESSION group_concat_max_len = 60000000;')
    return conn