Hi, Haihao!
On Oct 11, Haihao Tang wrote:
> Hi, all
> In MySQL XA, the transaction has four status, like:
> NON-EXISTING ---(XA START)---> ACTIVE ---(XA END)---> IDLE ---(XA
> PREPARED)---> PREPARE ---(XA COMMIT / XA ROLLBACK)---> NON_EXISTING
>
> 1) In those difference status, how does InnoDB occupy the resources? I
> mean, in status IDLE and PREPARE, does InnoDB occupies difference
> resources?
I don't understand the question. What resources do you mean here?
> 2) Why there is the status IDLE? Why not ACTIVE change to PREPARE
> after invoking 'XA PREPARED' and ignore IDLE.
Because MySQL follows the standard. Download the DTP-XA standard
from the X/Open site and see the state transition tables there.
Regards,
Sergei