summaryrefslogtreecommitdiff
path: root/scripts/mysqlhotcopy.sh
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2020-04-09 20:45:45 +0530
committerAndrei Elkin <andrei.elkin@mariadb.com>2020-10-23 18:04:31 +0300
commitbc00529d14aeda845d8129cb924efe4db2c11228 (patch)
tree3cfd84a4f79d8fa32887713b947493e48b0bbbc0 /scripts/mysqlhotcopy.sh
parent72cb20820b4f48fda0ae5e0ead4783d76dde3ec0 (diff)
downloadmariadb-git-bb-10.1-andrei.tar.gz
MDEV-21117: --tc-heuristic-recover=rollback is not replication safebb-10.1-andrei
Problem: ======= When run after master server crash --tc-heuristic-recover=rollback produces inconsistent server state with binlog still containing transactions that were rolled back by the option. Such way recovered server may not be used for replication. Fix: === A new --tc-heuristic-recover=BINLOG_TRUNCATE value is added to the server option. It works as ROLLBACK for engines but makes its best to synchronize binlog to truncate it to the last committed transaction. The BINLOG_TRUNCATE algorithm starts scanning possibly a sequences of binlog files starting from the binlog checkpoint file to find a truncate position candidate. The candidate truncate position corresponds to the beginning of the first GTID event whose transaction is not found to have been committed. There must be no committed transactions beyond this position *but* non-transactional events are possible. This is also checked to warn when the case. Rollback and possibly completion of partial commits (in the multi-engine case) is done regardless, as well as the binlog GTID state is adjusted accordingly. Also a STOP binlog event is written at the end of truncated binary log.
Diffstat (limited to 'scripts/mysqlhotcopy.sh')
0 files changed, 0 insertions, 0 deletions