summaryrefslogtreecommitdiff
path: root/sql/rpl_gtid.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-03-23 10:50:14 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-03-23 10:50:14 +0200
commit3b250837858c137f3a4082af6c0a20f95fde31d4 (patch)
tree9224188f329bb77443e9eb35680f91039e51adaf /sql/rpl_gtid.h
parent1a4998e98271ffd8126331336c4c4ae71029afc7 (diff)
parentf7599f47999bb197dba36e54d0d5677b3b15f12a (diff)
downloadmariadb-git-3b250837858c137f3a4082af6c0a20f95fde31d4.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/rpl_gtid.h')
-rw-r--r--sql/rpl_gtid.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/rpl_gtid.h b/sql/rpl_gtid.h
index 523af4856ae..11541c8000c 100644
--- a/sql/rpl_gtid.h
+++ b/sql/rpl_gtid.h
@@ -18,7 +18,7 @@
#include "hash.h"
#include "queues.h"
-
+#include <atomic>
/* Definitions for MariaDB global transaction ID (GTID). */
@@ -219,13 +219,10 @@ struct rpl_slave_state
The list can be read without lock by an SQL driver thread or worker thread
by reading the gtid_pos_tables pointer atomically with acquire semantics,
to ensure that it will see the correct next pointer of a new head element.
-
- The type is struct gtid_pos_table *, but needs to be void * to allow using
- my_atomic operations without violating C strict aliasing semantics.
*/
- void * volatile gtid_pos_tables;
+ std::atomic<gtid_pos_table*> gtid_pos_tables;
/* The default entry in gtid_pos_tables, mysql.gtid_slave_pos. */
- void * volatile default_gtid_pos_table;
+ std::atomic<gtid_pos_table*> default_gtid_pos_table;
bool loaded;
rpl_slave_state();