Crash happened because in discover, table->work_part_info was not properly reset before execution. Fixed by resetting before calling execute alter table, create table or mysql_create_frm_image.