• Ramil Kalimullin's avatar
    Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP · fb9ba373
    Ramil Kalimullin authored
    (temporary) TABLE, crash
    
    Problem: if one has an open "HANDLER t1", further "TRUNCATE t1" 
    doesn't close the handler and leaves handler table hash in an 
    inconsistent state, that may lead to a server crash.
    
    Fix: TRUNCATE should implicitly close all open handlers.
    
    Doc. request: the fact should be described in the manual accordingly.
    
    
    mysql-test/r/handler_myisam.result:
      Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP
      (temporary) TABLE, crash
        - test result.
    mysql-test/t/handler_myisam.test:
      Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP
      (temporary) TABLE, crash
        - test case.
    sql/sql_delete.cc:
      Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP
       (temporary) TABLE, crash
        - remove all truncated tables from the HANDLER's hash.
    fb9ba373
sql_delete.cc 34.3 KB