+----------------------------------+---------+ | NAME | ENABLED | +----------------------------------+---------+ | events_transactions_current | YES | | events_transactions_history | YES | | events_transactions_history_long | NO | +----------------------------------+---------+ 

To control transaction event collection at server startup, use lines like these in your my.cnf  file: 

•Enable: 

[mysqld] performance-schema-instrument=’transaction=ON’ performance-schema-consumer-events-transactions-current=ON performance-schema-consumer-events-transactions-history=ON performance-schema-consumer-events-transactions-history-long=ON 

•Disable: 

[mysqld] performance-schema-instrument=’transaction=OFF’ performance-schema-consumer-events-transactions-current=OFF performance-schema-consumer-events-transactions-history=OFF performance-schema-consumer-events-transactions-history-long=OFF 

To control transaction event collection at runtime, update the setup_instruments  and setup_consumers  tables: 

•Enable: 

UPDATE performance_schema.setup_instruments SET ENABLED = ’YES’, TIMED = ’YES’ WHERE NAME = ’transaction’; UPDATE performance_schema.setup_consumers SET ENABLED = ’YES’ WHERE NAME LIKE ’events_transactions%’; 

•Disable: 

UPDATE performance_schema.setup_instruments SET ENABLED = ’NO’, TIMED = ’NO’ WHERE NAME = ’transaction’; UPDATE performance_schema.setup_consumers SET ENABLED = ’NO’ WHERE NAME LIKE ’events_transactions%’; 

To collect transaction events only for specific transaction event tables, enable the transaction instrument but only the transaction consumers corresponding to the desired tables. 

For additional information about configuring event collection, see Section 27.3, “Performance Schema Startup Configuration” , and Section 27.4, “Performance Schema Runtime Configuration” . 

## Transaction Boundaries 

In MySQL Server, transactions start explicitly with these statements: 

START TRANSACTION | BEGIN | XA START | XA BEGIN 

Transactions also start implicitly. For example, when the autocommit  system variable is enabled, the start of each statement starts a new transaction. 

