• Sergey Glukhov's avatar
    Bug#45989 memory leak after explain encounters an error in the query · 643fbe42
    Sergey Glukhov authored
    Memory allocated in TMP_TABLE_PARAM::copy_field is not cleaned up.
    The fix is to clean up TMP_TABLE_PARAM::copy_field array in JOIN::destroy.
    
    
    mysql-test/r/explain.result:
      test result
    mysql-test/t/explain.test:
      test case
    sql/sql_select.cc:
      Memory allocated in TMP_TABLE_PARAM::copy_field is not cleaned up.
      The fix is to clean up TMP_TABLE_PARAM::copy_field array in JOIN::destroy.
    643fbe42
explain.test 3.88 KB