Ticket #1493: mysql-autologoutbug.patch

File mysql-autologoutbug.patch, 0.6 kB (added by amax@snaplogic.org, 2 years ago)
  • db/mysql_backend.py

    old new  
    185185        return self.cnx.insert_id() 
    186186 
    187187    def rollback(self): 
    188         if self.cnx.ping(): 
    189             self._set_character_set(self.cnx, 'utf8') 
     188        self.cnx.ping() 
     189        self._set_character_set(self.cnx, 'utf8') 
     190        try: 
    190191            self.cnx.rollback() 
    191         else
     192        except ProgrammingError
    192193            self._is_closed = True 
    193194 
    194195    def close(self):