Store transaction start time in thd->transaction.start_time. THD::transaction_time() wraps over transaction.start_time taking into account current status of BEGIN.