• Alexey Kopytov's avatar
    Bug #45309: InnoDB does not rollback for delete and update · 73cbaa6d
    Alexey Kopytov authored
                queries if query was killed 
     
    Since we rely on thd->is_error() to decide whether we should 
    COMMIT or ROLLBACK after a query execution, check the query 
    'killed' state and throw an error before calling 
    ha_autocommit_or_rollback(), not after. 
     
    The patch was tested manually. For reliable results, the test 
    case would have to KILL QUERY while a DELETE/UPDATE query in 
    another thread is still running. I don't see a way to achieve 
    this kind of synchronization in our test suite (no debug_sync 
    in 5.1).
    
    sql/sql_parse.cc:
      Since we rely on thd->is_error() to decide whether we should 
      COMMIT or ROLLBACK after query execution, check the query 
      'killed' state and throw an error before calling 
      ha_autocommit_or_rollback(), not after.
    73cbaa6d
sql_parse.cc 232 KB