• Monty's avatar
    MDEV-14943 Alter table ORDER BY bug · b050df4f
    Monty authored
    Problem was that if copy_data_between_tables() didn't do proper
    clean up in case of failures:
    - copy object was not properly freed
    - end_bulk_insert() was not called
    - mysql_trans_prepare_alter_copy_data() set THD->transaction.on to
      false which was not properly restored
    
    The last part caused a crash in Aria as Aria depends on that THD
    is correct.
    
    Other things:
    - Reset info->switched_transactional after usage (safety)
    - Reset bulk_insert_single_undo (safety)
    b050df4f
ma_recovery.c 122 KB