MySQL 8.4.2
Source Code Documentation
Close_connection_all_transactions_that_begin Class Reference
Inheritance diagram for Close_connection_all_transactions_that_begin:
[legend]

Public Member Functions

void operator() (THD *thd_to_close) override
 
- Public Member Functions inherited from Do_THD_Impl
virtual ~Do_THD_Impl ()=default
 

Member Function Documentation

◆ operator()()

void Close_connection_all_transactions_that_begin::operator() ( THD thd_to_close)
inlineoverridevirtual

Super user connection is also disconnected.

  1. If THD killed flag is already set, do not over-ride it because query was supposed to be rolled back, we will end up overriding the decision resulting in closing the connection.
  2. If THD life cycle has finished do not kill the transaction.
  3. If THD has error, do not kill the transaction, it will be rolled back.
  4. REPLICA thread should not be running but yet check it. Do not kill REPLICA transactions.
  5. Transaction should not be binloggable, so check we are > TX_RPL_STAGE_CACHE_CREATED
  6. Do not close connection of committing transaction, so check < TX_RPL_STAGE_BEFORE_COMMIT
  7. TX_RPL_STAGE_BEFORE_ROLLBACK is not required, transaction is being rolledback, no need to close connection
  8. Kill all explicit transactions which are not committing because change primary UDF blocks on explicit transactions

Implements Do_THD_Impl.


The documentation for this class was generated from the following file: