mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
MDEV-21037 mariabackup does not detect multi-source replication slave
This commit is contained in:
parent
3fec38d91d
commit
907e4c62ce
7 changed files with 510 additions and 79 deletions
|
|
@ -0,0 +1,14 @@
|
|||
--disable_query_log
|
||||
--file_exists $targetdir/xtrabackup_slave_info
|
||||
CREATE TEMPORARY TABLE tmp_slave_info(lineno SERIAL, line TEXT);
|
||||
--replace_result $targetdir TARGETDIR
|
||||
--eval LOAD DATA LOCAL INFILE '$targetdir/xtrabackup_slave_info' INTO TABLE tmp_slave_info (line);
|
||||
SELECT
|
||||
lineno,
|
||||
regexp_replace(
|
||||
regexp_replace(line, '(?<=MASTER_LOG_POS=)[0-9]+', '<NUM>'),
|
||||
'[0-9]+-[0-9]+-[0-9]+', '<NUM-NUM-NUM>')
|
||||
AS line
|
||||
FROM tmp_slave_info ORDER BY lineno;
|
||||
DROP TEMPORARY TABLE tmp_slave_info;
|
||||
--enable_query_log
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
--disable_query_log
|
||||
--file_exists $XTRABACKUP_OUT
|
||||
CREATE TEMPORARY TABLE tmp_slave_info_out(lineno SERIAL, line TEXT);
|
||||
--replace_result $targetdir TARGETDIR
|
||||
--eval LOAD DATA LOCAL INFILE '$XTRABACKUP_OUT' INTO TABLE tmp_slave_info_out (line);
|
||||
SELECT
|
||||
replace(
|
||||
regexp_replace(
|
||||
regexp_replace(line,
|
||||
'[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]',
|
||||
'YYYY-MM-DD hh:mm:ss'),
|
||||
'[0-9]+-[0-9]+-[0-9]+', '<NUM-NUM-NUM>'),
|
||||
'\r','' /* Remove CR on Windows */)
|
||||
AS line
|
||||
FROM tmp_slave_info_out
|
||||
WHERE line LIKE '%MySQL slave binlog position%'
|
||||
OR line LIKE '%Failed to get master binlog coordinates%'
|
||||
ORDER BY lineno;
|
||||
DROP TEMPORARY TABLE tmp_slave_info_out;
|
||||
--enable_query_log
|
||||
Loading…
Add table
Add a link
Reference in a new issue