summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-05-18 10:34:38 +0200
committerSergei Golubchik <serg@mariadb.org>2022-05-18 10:34:38 +0200
commit99a433ed1cc2cebad93d6ece2b65691f2f49d3ea (patch)
treee7fc16ab8fe9b4b9ff486d1adbc27ed84c72b923 /sql/handler.h
parent0a1d9d0681fda7595c0d08038357b56cf3bea9eb (diff)
parentb2187662bcba12b66667bc0531727453b3b8a666 (diff)
downloadmariadb-git-99a433ed1cc2cebad93d6ece2b65691f2f49d3ea.tar.gz
Merge branch '10.6' into 10.7mariadb-10.7.4
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/handler.h b/sql/handler.h
index e8960d095e5..ed24f160385 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -965,6 +965,7 @@ typedef struct xid_t XID;
*/
typedef uint Binlog_file_id;
const Binlog_file_id MAX_binlog_id= UINT_MAX;
+const my_off_t MAX_off_t = (~(my_off_t) 0);
/*
Compound binlog-id and byte offset of transaction's first event
in a sequence (e.g the recovery sequence) of binlog files.
@@ -979,14 +980,22 @@ struct xid_recovery_member
my_xid xid;
uint in_engine_prepare; // number of engines that have xid prepared
bool decided_to_commit;
- Binlog_offset binlog_coord; // semisync recovery binlog offset
+ /*
+ Semisync recovery binlog offset. It's initialized with the maximum
+ unreachable offset. The max value will remain for any transaction
+ not found in binlog to yield its rollback decision as it's guaranteed
+ to be within a truncated tail part of the binlog.
+ */
+ Binlog_offset binlog_coord;
XID *full_xid; // needed by wsrep or past it recovery
decltype(::server_id) server_id; // server id of orginal server
xid_recovery_member(my_xid xid_arg, uint prepare_arg, bool decided_arg,
XID *full_xid_arg, decltype(::server_id) server_id_arg)
: xid(xid_arg), in_engine_prepare(prepare_arg),
- decided_to_commit(decided_arg), full_xid(full_xid_arg) , server_id(server_id_arg) {};
+ decided_to_commit(decided_arg),
+ binlog_coord(Binlog_offset(MAX_binlog_id, MAX_off_t)),
+ full_xid(full_xid_arg), server_id(server_id_arg) {};
};
/* for recover() handlerton call */