diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2020-03-25 17:27:42 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2020-03-25 23:49:38 +0400 |
commit | 1c8de231a3ea7ef2e08b1a5cfe17c37d733ea6ce (patch) | |
tree | f68783ce78ea6a2bc862f34bc040bf207203ba14 /sql/rpl_rli.h | |
parent | 98fc6b923f69cd054ef715f918f72da72555bad3 (diff) | |
download | mariadb-git-1c8de231a3ea7ef2e08b1a5cfe17c37d733ea6ce.tar.gz |
dequeued_count my_atomic to Atomic_counter
Also allocate inuse_relaylog with new rather than my_malloc(MY_ZEROFILL).
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r-- | sql/rpl_rli.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 0e2e42fcb08..5d2d33c397f 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -608,10 +608,20 @@ struct inuse_relaylog { /* Number of events in this relay log queued for worker threads. */ int64 queued_count; /* Number of events completed by worker threads. */ - volatile int64 dequeued_count; + Atomic_counter<int64> dequeued_count; /* Set when all events have been read from a relaylog. */ bool completed; char name[FN_REFLEN]; + + inuse_relaylog(Relay_log_info *rli_arg, rpl_gtid *relay_log_state_arg, + uint32 relay_log_state_count_arg, + const char *name_arg): + next(0), rli(rli_arg), relay_log_state(relay_log_state_arg), + relay_log_state_count(relay_log_state_count_arg), queued_count(0), + dequeued_count(0), completed(false) + { + strmake_buf(name, name_arg); + } }; |