summaryrefslogtreecommitdiff
path: root/plugin/semisync/semisync_master.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/semisync/semisync_master.h')
-rw-r--r--plugin/semisync/semisync_master.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/plugin/semisync/semisync_master.h b/plugin/semisync/semisync_master.h
index dbe8bb9d5e2..1a951fa0ba2 100644
--- a/plugin/semisync/semisync_master.h
+++ b/plugin/semisync/semisync_master.h
@@ -29,31 +29,26 @@ extern PSI_cond_key key_ss_cond_COND_binlog_send_;
/**
This class manages memory for active transaction list.
- We record each active transaction with a TranxNode. Because each
- session can only have only one open transaction, the total active
- transaction nodes can not exceed the maximum sessions. Currently
- in MySQL, sessions are the same as connections.
+ We record each active transaction with a TranxNode, each session
+ can have only one open transaction. Because of EVENT, the total
+ active transaction nodes can exceed the maximum allowed
+ connections.
*/
class ActiveTranx
:public Trace {
private:
struct TranxNode {
- char *log_name_;
+ char log_name_[FN_REFLEN];
my_off_t log_pos_;
struct TranxNode *next_; /* the next node in the sorted list */
struct TranxNode *hash_next_; /* the next node during hash collision */
};
- /* The following data structure maintains an active transaction list. */
- TranxNode *node_array_;
- TranxNode *free_pool_;
-
/* These two record the active transaction list in sort order. */
TranxNode *trx_front_, *trx_rear_;
TranxNode **trx_htb_; /* A hash table on active transactions. */
- int num_transactions_; /* maximum transactions */
int num_entries_; /* maximum hash table entries */
mysql_mutex_t *lock_; /* mutex lock */
@@ -80,8 +75,7 @@ private:
}
public:
- ActiveTranx(int max_connections, mysql_mutex_t *lock,
- unsigned long trace_level);
+ ActiveTranx(mysql_mutex_t *lock, unsigned long trace_level);
~ActiveTranx();
/* Insert an active transaction node with the specified position.
@@ -183,11 +177,6 @@ class ReplSemiSyncMaster
bool state_; /* whether semi-sync is switched */
- /* The number of maximum active transactions. This should be the same as
- * maximum connections because MySQL does not do connection sharing now.
- */
- int max_transactions_;
-
void lock();
void unlock();
void cond_broadcast();