def _close_result(self):
        #make sure any previous resultset is closed correctly
        
        if self.result is not None:
            #make sure any left over resultset is read from the db, otherwise
            #the connection would be in an inconsistent state
            try:
                while True:
                    self.result_iter.next()
            except __HOLE__:
                pass #done
            self.result.close()

        self.description = None
        self.result = None
        self.result_iter = None
        self.lastrowid = None
        self.rowcount = -1
dataset/ETHPy150Open concurrence/concurrence/lib/concurrence/database/mysql/dbapi.py/Cursor._close_result