Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3ea49d35
Commit
3ea49d35
authored
Mar 11, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
ab7e2b04
2a2ab121
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
307 additions
and
78 deletions
+307
-78
CMakeLists.txt
CMakeLists.txt
+9
-0
cmake/os/Linux.cmake
cmake/os/Linux.cmake
+1
-1
cmake/plugin.cmake
cmake/plugin.cmake
+1
-1
mysql-test/suite/galera/disabled.def
mysql-test/suite/galera/disabled.def
+3
-1
mysql-test/suite/galera/r/galera_kill_nochanges.result
mysql-test/suite/galera/r/galera_kill_nochanges.result
+2
-0
mysql-test/suite/galera/r/galera_many_rows.result
mysql-test/suite/galera/r/galera_many_rows.result
+15
-13
mysql-test/suite/galera/r/galera_var_dirty_reads.result
mysql-test/suite/galera/r/galera_var_dirty_reads.result
+0
-2
mysql-test/suite/galera/r/galera_var_notify_cmd.result
mysql-test/suite/galera/r/galera_var_notify_cmd.result
+1
-0
mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
...l-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
+2
-8
mysql-test/suite/galera/t/galera_kill_nochanges.test
mysql-test/suite/galera/t/galera_kill_nochanges.test
+8
-1
mysql-test/suite/galera/t/galera_many_rows.cnf
mysql-test/suite/galera/t/galera_many_rows.cnf
+5
-0
mysql-test/suite/galera/t/galera_many_rows.test
mysql-test/suite/galera/t/galera_many_rows.test
+12
-7
mysql-test/suite/galera/t/galera_var_dirty_reads.test
mysql-test/suite/galera/t/galera_var_dirty_reads.test
+0
-5
mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
...te/galera_3nodes/r/galera_ipv6_mariabackup_section.result
+18
-0
mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
...st/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
+14
-0
mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.cnf
...suite/galera_3nodes/t/galera_ipv6_mariabackup_section.cnf
+39
-0
mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.opt
...suite/galera_3nodes/t/galera_ipv6_mariabackup_section.opt
+1
-0
mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
...uite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
+69
-0
mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.cnf
...-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.cnf
+31
-0
mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.opt
...-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.opt
+1
-0
mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.test
...test/suite/galera_3nodes/t/galera_ipv6_rsync_section.test
+32
-0
scripts/wsrep_sst_common.sh
scripts/wsrep_sst_common.sh
+0
-2
scripts/wsrep_sst_mariabackup.sh
scripts/wsrep_sst_mariabackup.sh
+42
-30
scripts/wsrep_sst_rsync.sh
scripts/wsrep_sst_rsync.sh
+1
-4
scripts/wsrep_sst_xtrabackup-v2.sh
scripts/wsrep_sst_xtrabackup-v2.sh
+0
-3
No files found.
CMakeLists.txt
View file @
3ea49d35
...
...
@@ -211,6 +211,15 @@ IF (WITH_ASAN)
ENDIF
()
ENDIF
()
OPTION
(
WITH_UBSAN
"Enable undefined behavior sanitizer"
OFF
)
IF
(
WITH_UBSAN
)
IF
(
SECURITY_HARDENED
)
MESSAGE
(
FATAL_ERROR
"WITH_UBSAN and SECURITY_HARDENED are mutually exclusive"
)
ENDIF
()
MY_CHECK_AND_SET_COMPILER_FLAG
(
"-fsanitize=undefined"
DEBUG RELWITHDEBINFO
)
ENDIF
()
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load
IF
(
CMAKE_C_COMPILER_VERSION VERSION_LESS
"4.6"
)
...
...
cmake/os/Linux.cmake
View file @
3ea49d35
...
...
@@ -35,7 +35,7 @@ ENDFOREACH()
# Ensure we have clean build for shared libraries
# without unresolved symbols
# Not supported with AddressSanitizer
IF
(
NOT WITH_ASAN
)
IF
(
NOT WITH_ASAN
AND NOT WITH_UBSAN
)
SET
(
LINK_FLAG_NO_UNDEFINED
"-Wl,--no-undefined"
)
ENDIF
()
...
...
cmake/plugin.cmake
View file @
3ea49d35
...
...
@@ -209,7 +209,7 @@ MACRO(MYSQL_ADD_PLUGIN)
ELSEIF
(
NOT CMAKE_SYSTEM_NAME STREQUAL
"Linux"
)
TARGET_LINK_LIBRARIES
(
${
target
}
mysqld
)
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_NAME STREQUAL
"Linux"
AND NOT WITH_ASAN
)
ELSEIF
(
CMAKE_SYSTEM_NAME STREQUAL
"Linux"
AND NOT WITH_ASAN
AND NOT WITH_UBSAN
)
TARGET_LINK_LIBRARIES
(
${
target
}
"-Wl,--no-undefined"
)
ENDIF
()
...
...
mysql-test/suite/galera/disabled.def
View file @
3ea49d35
...
...
@@ -26,8 +26,10 @@ galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
galera_binlog_stmt_autoinc : MDEV-13549 auto_increment mismatch
galera_flush : MariaDB does not have global.thread_statistics
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_gcs_fc_limit : MDEV-17061 Timeout in wait_condition.inc for PROCESSLIST
galera_ist_progress: MDEV-15236 galera_ist_progress fails when trying to read transfer status
galera_ist_mariabackup : MDEV-18829 test leaves port open
galera_ist_progress: MDEV-15236 fails when trying to read transfer status
galera_kill_applier : race condition at the start of the test
galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl
galera_migrate : MariaDB does not support START SLAVE USER
...
...
mysql-test/suite/galera/r/galera_kill_nochanges.result
View file @
3ea49d35
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
...
...
mysql-test/suite/galera/r/galera_many_rows.result
View file @
3ea49d35
connection node_1;
connection node_2;
connection node_1;
SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600;
CREATE TABLE ten (f1 INTEGER);
CREATE TABLE ten (f1 INTEGER)
engine=InnoDB
;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
...
...
@@ -9,24 +11,24 @@ connection node_2;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = 15;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
SELECT COUNT(*)
= 100000
FROM t1;
COUNT(*)
= 100000
1
SELECT COUNT(*) FROM t1;
COUNT(*)
1
00000
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
connection node_1;
SELECT COUNT(*)
= 200000
FROM t1;
COUNT(*)
= 200000
1
SELECT COUNT(*) FROM t1;
COUNT(*)
200000
UPDATE t1 SET f2 = 1;
connection node_2;
SELECT COUNT(*)
= 200000
FROM t1 WHERE f2 = 1;
COUNT(*)
= 200000
1
SELECT COUNT(*) FROM t1 WHERE f2 = 1;
COUNT(*)
200000
connection node_1;
START TRANSACTION;
SELECT COUNT(*)
= 200000
FROM t1;
COUNT(*)
= 200000
1
SELECT COUNT(*) FROM t1;
COUNT(*)
200000
UPDATE t1 SET f2 = 3;
connection node_2;
START TRANSACTION;
...
...
mysql-test/suite/galera/r/galera_var_dirty_reads.result
View file @
3ea49d35
connection node_1;
connection node_2;
connection node_1;
connection node_2;
connection node_2;
CREATE TABLE t1(i INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
...
...
mysql-test/suite/galera/r/galera_var_notify_cmd.result
View file @
3ea49d35
connection node_1;
SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
COUNT(DISTINCT uuid) = 2
1
...
...
mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
View file @
3ea49d35
...
...
@@ -5,7 +5,6 @@
--
source
include
/
big_test
.
inc
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_mariabackup
.
inc
--
connection
node_1
...
...
@@ -29,11 +28,11 @@ END|
DELIMITER
;
|
--
send
CALL
p1
();
--
sleep
2
--
sleep
1
--
connection
node_2
--
send
CALL
p1
();
--
sleep
2
--
sleep
1
# Kill and restart node #2
...
...
@@ -41,10 +40,7 @@ DELIMITER ;|
--
connection
node_2a
--
source
include
/
kill_galera
.
inc
--
sleep
10
--
source
include
/
start_mysqld
.
inc
--
sleep
25
--
source
include
/
wait_until_connected_again
.
inc
INSERT
INTO
t1
VALUES
(
DEFAULT
);
...
...
@@ -68,8 +64,6 @@ INSERT INTO t1 VALUES (DEFAULT);
--
error
2013
,
2006
--
reap
--
sleep
10
# Confirm that the count is correct and that the cluster is intact
--
connection
node_1a
...
...
mysql-test/suite/galera/t/galera_kill_nochanges.test
View file @
3ea49d35
...
...
@@ -3,7 +3,11 @@
#
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
include
/
auto_increment_offset_save
.
inc
--
connection
node_1
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
...
...
@@ -29,4 +33,7 @@ SET SESSION wsrep_sync_wait = DEFAULT;
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
let
$node_2
=
node_2a
--
source
include
/
auto_increment_offset_restore
.
inc
DROP
TABLE
t1
;
mysql-test/suite/galera/t/galera_many_rows.cnf
0 → 100644
View file @
3ea49d35
!include ../galera_2nodes.cnf
[mysqld]
innodb-status-output=ON
innodb-status-output-locks=ON
mysql-test/suite/galera/t/galera_many_rows.test
View file @
3ea49d35
--
source
include
/
big_test
.
inc
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
include
/
auto_increment_offset_save
.
inc
--
connection
node_1
SET
SESSION
innodb_lock_wait_timeout
=
600
;
SET
SESSION
lock_wait_timeout
=
600
;
CREATE
TABLE
ten
(
f1
INTEGER
);
CREATE
TABLE
ten
(
f1
INTEGER
)
engine
=
InnoDB
;
INSERT
INTO
ten
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
),(
10
);
CREATE
TABLE
t1
(
f1
INTEGER
AUTO_INCREMENT
PRIMARY
KEY
,
f2
INTEGER
)
Engine
=
InnoDB
;
...
...
@@ -20,19 +23,19 @@ SET SESSION wsrep_sync_wait = 15;
SET
GLOBAL
wsrep_provider_options
=
'repl.causal_read_timeout=PT1H'
;
SELECT
COUNT
(
*
)
=
100000
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
INSERT
INTO
t1
(
f2
)
SELECT
a1
.
f1
FROM
ten
AS
a1
,
ten
AS
a2
,
ten
AS
a3
,
ten
AS
a4
,
ten
AS
a5
;
--
connection
node_1
SELECT
COUNT
(
*
)
=
200000
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
UPDATE
t1
SET
f2
=
1
;
--
connection
node_2
SELECT
COUNT
(
*
)
=
200000
FROM
t1
WHERE
f2
=
1
;
SELECT
COUNT
(
*
)
FROM
t1
WHERE
f2
=
1
;
--
connection
node_1
START
TRANSACTION
;
SELECT
COUNT
(
*
)
=
200000
FROM
t1
;
SELECT
COUNT
(
*
)
FROM
t1
;
UPDATE
t1
SET
f2
=
3
;
--
connection
node_2
...
...
@@ -50,5 +53,7 @@ COMMIT;
--
eval
SET
GLOBAL
wsrep_provider_options
=
'$wsrep_provider_options_node2'
;
--
enable_query_log
--
source
include
/
auto_increment_offset_restore
.
inc
DROP
TABLE
t1
;
DROP
TABLE
ten
;
mysql-test/suite/galera/t/galera_var_dirty_reads.test
View file @
3ea49d35
...
...
@@ -11,11 +11,6 @@
--
let
$node_2
=
node_2
--
source
include
/
auto_increment_offset_save
.
inc
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
include
/
auto_increment_offset_save
.
inc
--
connection
node_2
--
let
$wsrep_cluster_address_saved
=
`SELECT @@global.wsrep_cluster_address`
...
...
mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
0 → 100644
View file @
3ea49d35
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
include/assert_grep.inc [Prepared IST receiver, listening at: tcp://\[::1\]]
mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
0 → 100644
View file @
3ea49d35
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.cnf
0 → 100644
View file @
3ea49d35
!include ../galera_3nodes.cnf
# decoy value - should not be read by mysqld or sst scripts
[mysqld]
innodb-data-home-dir=/tmp
[galera]
innodb-data-home-dir=
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_node_address=::1
[galera.1]
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
wsrep_node_name=node_1
[galera.2]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
wsrep_node_name=node_2
wsrep_sst_donor=node_1
[galera.3]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
wsrep_node_name=node_3
wsrep_sst_donor=node_1
[SST]
transferfmt=@ENV.MTR_GALERA_TFMT
streamfmt=xbstream
sockopt=",pf=ip6"
mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.opt
0 → 100644
View file @
3ea49d35
--bind-address=::
mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
0 → 100644
View file @
3ea49d35
--
source
include
/
galera_cluster
.
inc
--
source
include
/
check_ipv6
.
inc
--
source
suite
/
galera
/
include
/
have_mariabackup
.
inc
# Confirm that initial handshake happened over ipv6
SELECT
VARIABLE_VALUE
LIKE
'%[::1]%'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_incoming_addresses'
;
SELECT
VARIABLE_VALUE
=
3
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
# Force IST
--
connection
node_2
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=1'
;
--
connection
node_1
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
source
include
/
wait_condition
.
inc
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
);
--
connection
node_2
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=0'
;
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
3
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
source
include
/
wait_condition
.
inc
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
'ON'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_ready'
;
--
source
include
/
wait_condition
.
inc
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
DROP
TABLE
t1
;
# Confirm that key messages around SST and IST reference IPv6
--
connection
node_1
--
let
$assert_file
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
--
let
$assert_only_after
=
CURRENT_TEST
# The SSTs happen when nodes are started first time
--
let
$assert_count
=
2
--
let
$assert_text
=
Streaming
the
backup
to
joiner
at
\
[
::
1
\
]
--
let
$assert_select
=
Streaming
the
backup
to
joiner
at
\
[
::
1
\
]
--
source
include
/
assert_grep
.
inc
# There will be 1 ISTs donated from node_1 in Galera 3.
# Two first happen at the initial startup to populate the certification
# index. The third one is from the IST which happens during the actual test.
--
let
$assert_count
=
1
--
let
$assert_text
=
async
IST
sender
starting
to
serve
tcp
://
\
[
::
1
\
]
:
--
let
$assert_select
=
async
IST
sender
starting
to
serve
tcp
://
\
[
::
1
\
]
:
--
source
include
/
assert_grep
.
inc
--
connection
node_2
--
let
$assert_file
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
2.
err
--
let
$assert_only_after
=
CURRENT_TEST
# There is one ISTs on joiner at Galera 3.
--
let
$assert_count
=
1
--
let
$assert_text
=
IST
receiver
addr
using
tcp
://
\
[
::
1
\
]
--
let
$assert_select
=
IST
receiver
addr
using
tcp
://
\
[
::
1
\
]
--
source
include
/
assert_grep
.
inc
# There will be only one Prepared IST and in Galera 3 segnos are not printed
--
let
$assert_count
=
1
--
let
$assert_text
=
Prepared
IST
receiver
,
listening
at
:
tcp
://
\
[
::
1
\
]
--
let
$assert_select
=
Prepared
IST
receiver
,
listening
at
:
tcp
://
\
[
::
1
\
]
--
source
include
/
assert_grep
.
inc
mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.cnf
0 → 100644
View file @
3ea49d35
!include ../galera_3nodes.cnf
# decoy value - should not be read by mysqld or sst scripts
[mysqld]
innodb-data-home-dir=/tmp
[mariadb]
innodb-data-home-dir=
wsrep_sst_method=rsync
wsrep_node_address=::1
[mariadb.1]
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
[mariadb.2]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
[mariadb.3]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
[SST]
sockopt=",pf=ip6"
mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.opt
0 → 100644
View file @
3ea49d35
--bind-address=::
mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.test
0 → 100644
View file @
3ea49d35
--
source
include
/
galera_cluster
.
inc
--
source
include
/
check_ipv6
.
inc
# Confirm that initial handshake happened over ipv6
SELECT
VARIABLE_VALUE
LIKE
'%[::1]%'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_incoming_addresses'
;
SELECT
VARIABLE_VALUE
=
3
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
# Force IST
--
connection
node_2
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=1'
;
--
connection
node_1
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
2
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
source
include
/
wait_condition
.
inc
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
);
--
connection
node_2
SET
GLOBAL
wsrep_provider_options
=
'gmcast.isolate=0'
;
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
3
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_cluster_size'
;
--
source
include
/
wait_condition
.
inc
--
let
$wait_condition
=
SELECT
VARIABLE_VALUE
=
'ON'
FROM
INFORMATION_SCHEMA
.
GLOBAL_STATUS
WHERE
VARIABLE_NAME
=
'wsrep_ready'
;
--
source
include
/
wait_condition
.
inc
SELECT
COUNT
(
*
)
=
1
FROM
t1
;
DROP
TABLE
t1
;
scripts/wsrep_sst_common.sh
View file @
3ea49d35
...
...
@@ -28,7 +28,6 @@ WSREP_SST_OPT_PSWD=${WSREP_SST_OPT_PSWD:-}
WSREP_SST_OPT_DEFAULT
=
""
WSREP_SST_OPT_EXTRA_DEFAULT
=
""
WSREP_SST_OPT_SUFFIX_DEFAULT
=
""
WSREP_SST_OPT_SUFFIX_VALUE
=
""
INNODB_DATA_HOME_DIR_ARG
=
""
while
[
$#
-gt
0
]
;
do
...
...
@@ -94,7 +93,6 @@ case "$1" in
;;
'--defaults-group-suffix'
)
readonly
WSREP_SST_OPT_SUFFIX_DEFAULT
=
"
$1
=
$2
"
readonly
WSREP_SST_OPT_SUFFIX_VALUE
=
"
$2
"
shift
;;
'--host'
)
...
...
scripts/wsrep_sst_mariabackup.sh
View file @
3ea49d35
#!/bin/bash -ue
# Copyright (C) 2013 Percona Inc
# Copyright (C) 2017 MariaDB
# Copyright (C) 2017
-2019
MariaDB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -77,7 +77,7 @@ sdecomp=""
# 5.6.21 PXC and later can't donate to an older joiner
sst_ver
=
1
if
which pv &>/dev/null
&&
pv
--help
|
grep
-q
FORMAT
;
then
if
pv
--help
2>/dev/null |
grep
-q
FORMAT
;
then
pvopts+
=
$pvformat
fi
pcmd
=
"pv
$pvopts
"
...
...
@@ -175,10 +175,8 @@ get_transfer()
fi
if
[[
$tfmt
==
'nc'
]]
;
then
if
[[
!
-x
`
which nc
`
]]
;
then
wsrep_log_error
"nc(netcat) not found in path:
$PATH
"
exit
2
fi
wsrep_check_programs nc
wsrep_log_info
"Using netcat as streamer"
if
[[
"
$WSREP_SST_OPT_ROLE
"
==
"joiner"
]]
;
then
if
nc
-h
2>&1 |
grep
-q
ncat
;
then
...
...
@@ -205,11 +203,8 @@ get_transfer()
fi
else
tfmt
=
'socat'
wsrep_check_programs socat
wsrep_log_info
"Using socat as streamer"
if
[[
!
-x
`
which socat
`
]]
;
then
wsrep_log_error
"socat not found in path:
$PATH
"
exit
2
fi
if
[[
$encrypt
-eq
2
||
$encrypt
-eq
3
]]
&&
!
socat
-V
|
grep
-q
"WITH_OPENSSL 1"
;
then
wsrep_log_error
"Encryption requested, but socat is not OpenSSL enabled (encrypt=
$encrypt
)"
...
...
@@ -298,7 +293,7 @@ get_footprint()
adjust_progress
()
{
if
[[
!
-x
`
which pv
`
]]
;
then
if
!
command
-v
pv
>
/dev/null
;
then
wsrep_log_error
"pv not found in path:
$PATH
"
wsrep_log_error
"Disabling all progress/rate-limiting"
pcmd
=
""
...
...
@@ -603,7 +598,7 @@ recv_joiner()
pushd
${
dir
}
1>/dev/null
set
+e
if
[[
$tmt
-gt
0
&&
-x
`
which
timeout
`
]]
;
then
if
[[
$tmt
-gt
0
]]
&&
command
-v
timeout
>
/dev/null
;
then
if
timeout
--help
|
grep
-q
--
'-k'
;
then
ltcmd
=
"timeout -k
$((
tmt+10
))
$tmt
$tcmd
"
else
...
...
@@ -673,7 +668,7 @@ monitor_process()
exit
32
fi
if
!
ps
-p
"
${
sst_stream_pid
}
"
&>/dev/null
;
then
if
!
ps
-p
"
${
sst_stream_pid
}
"
&>/dev/null
;
then
break
fi
...
...
@@ -682,10 +677,7 @@ monitor_process()
done
}
if
[[
!
-x
`
which
$INNOBACKUPEX_BIN
`
]]
;
then
wsrep_log_error
"
${
INNOBACKUPEX_BIN
}
not in path:
$PATH
"
exit
2
fi
wsrep_check_programs
"
$INNOBACKUPEX_BIN
"
rm
-f
"
${
MAGIC_FILE
}
"
...
...
@@ -709,9 +701,30 @@ fi
INNOEXTRA
=
""
INNODB_DATA_HOME_DIR
=
${
INNODB_DATA_HOME_DIR
:-
""
}
# Try to set INNODB_DATA_HOME_DIR from the command line:
if
[
!
-z
"
$INNODB_DATA_HOME_DIR_ARG
"
]
;
then
INNODB_DATA_HOME_DIR
=
$INNODB_DATA_HOME_DIR_ARG
fi
# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
if
[
-z
"
$INNODB_DATA_HOME_DIR
"
]
;
then
INNODB_DATA_HOME_DIR
=
$(
parse_cnf
--mysqld
innodb-data-home-dir
''
)
fi
if
[
!
-z
"
$INNODB_DATA_HOME_DIR
"
]
;
then
INNOEXTRA+
=
" --innodb-data-home-dir=
$INNODB_DATA_HOME_DIR
"
fi
if
[
-n
"
$INNODB_DATA_HOME_DIR
"
]
;
then
# handle both relative and absolute paths
INNODB_DATA_HOME_DIR
=
$(
cd
$DATA
;
mkdir
-p
"
$INNODB_DATA_HOME_DIR
"
;
cd
$INNODB_DATA_HOME_DIR
;
pwd
-P
)
else
# default to datadir
INNODB_DATA_HOME_DIR
=
$(
cd
$DATA
;
pwd
-P
)
fi
if
[[
$ssyslog
-eq
1
]]
;
then
if
[[
!
-x
`
which logger
`
]]
;
then
if
!
command
-v
logger
>
/dev/null
;
then
wsrep_log_error
"logger not in path:
$PATH
. Ignoring"
else
...
...
@@ -729,7 +742,7 @@ if [[ $ssyslog -eq 1 ]];then
logger
-p
daemon.info
-t
${
ssystag
}
wsrep-sst-
$WSREP_SST_OPT_ROLE
"
$@
"
}
INNOAPPLY
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
$disver
$iapts
--apply-log
\$
rebuildcmd
\$
{DATA} 2>&1 | logger -p daemon.err -t
${
ssystag
}
innobackupex-apply "
INNOAPPLY
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
$disver
$iapts
\$
INNOEXTRA
--apply-log
\$
rebuildcmd
\$
{DATA} 2>&1 | logger -p daemon.err -t
${
ssystag
}
innobackupex-apply "
INNOMOVE
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
${
WSREP_SST_OPT_CONF
}
$disver
$impts
--move-back --force-non-empty-directories
\$
{DATA} 2>&1 | logger -p daemon.err -t
${
ssystag
}
innobackupex-move "
INNOBACKUP
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
${
WSREP_SST_OPT_CONF
}
$disver
$iopts
\$
tmpopts
\$
INNOEXTRA --galera-info --stream=
\$
sfmt
\$
itmpdir 2> >(logger -p daemon.err -t
${
ssystag
}
innobackupex-backup)"
fi
...
...
@@ -738,8 +751,8 @@ else
if
[[
"
$sstlogarchive
"
-eq
1
]]
then
ARCHIVETIMESTAMP
=
$(
date
"+%Y.%m.%d-%H.%M.%S"
)
newfile
=
""
ARCHIVETIMESTAMP
=
$(
date
"+%Y.%m.%d-%H.%M.%S
.%N
"
)
newfile
=
""
if
[[
!
-z
"
$sstlogarchivedir
"
]]
then
...
...
@@ -793,7 +806,7 @@ then
fi
INNOAPPLY
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
$disver
$iapts
--apply-log
\$
rebuildcmd
\$
{DATA} &>
${
INNOAPPLYLOG
}
"
INNOAPPLY
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
$disver
$iapts
\$
INNOEXTRA
--apply-log
\$
rebuildcmd
\$
{DATA} &>
${
INNOAPPLYLOG
}
"
INNOMOVE
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
${
WSREP_SST_OPT_CONF
}
$disver
$impts
--move-back --force-non-empty-directories
\$
{DATA} &>
${
INNOMOVELOG
}
"
INNOBACKUP
=
"
${
INNOBACKUPEX_BIN
}
--innobackupex
${
WSREP_SST_OPT_CONF
}
$disver
$iopts
\$
tmpopts
\$
INNOEXTRA --galera-info --stream=
\$
sfmt
\$
itmpdir 2>
${
INNOBACKUPLOG
}
"
fi
...
...
@@ -814,7 +827,7 @@ then
exit
93
fi
if
[[
-z
$(
parse_cnf mysqld tmpdir
""
)
&&
-z
$(
parse_cnf xtrabackup tmpdir
""
)
]]
;
then
if
[[
-z
$(
parse_cnf
--
mysqld
tmpdir
""
)
&&
-z
$(
parse_cnf xtrabackup tmpdir
""
)
]]
;
then
xtmpdir
=
$(
mktemp
-d
)
tmpopts
=
" --tmpdir=
$xtmpdir
"
wsrep_log_info
"Using
$xtmpdir
as xtrabackup temporary directory"
...
...
@@ -936,9 +949,9 @@ then
[[
-e
$SST_PROGRESS_FILE
]]
&&
wsrep_log_info
"Stale sst_in_progress file:
$SST_PROGRESS_FILE
"
[[
-n
$SST_PROGRESS_FILE
]]
&&
touch
$SST_PROGRESS_FILE
ib_home_dir
=
$
(
parse_cnf mysqld innodb-data-home-dir
""
)
ib_log_dir
=
$(
parse_cnf mysqld innodb-log-group-home-dir
""
)
ib_undo_dir
=
$(
parse_cnf mysqld innodb-undo-directory
""
)
ib_home_dir
=
$
INNODB_DATA_HOME_DIR
ib_log_dir
=
$(
parse_cnf
--
mysqld
innodb-log-group-home-dir
""
)
ib_undo_dir
=
$(
parse_cnf
--
mysqld
innodb-undo-directory
""
)
stagemsg
=
"Joiner-Recv"
...
...
@@ -1008,15 +1021,14 @@ then
jpid
=
$!
wsrep_log_info
"Proceeding with SST"
wsrep_log_info
"Cleaning the existing datadir and innodb-data/log directories"
if
[
"
${
OS
}
"
=
"FreeBSD"
]
;
then
find
-E
$ib_home_dir
$ib_log_dir
$ib_undo_dir
$DATA
-mindepth
1
-prune
-regex
$cpat
-o
-exec
rm
-rfv
{}
1>&2
\+
else
find
$ib_home_dir
$ib_log_dir
$ib_undo_dir
$DATA
-mindepth
1
-prune
-regex
$cpat
-o
-exec
rm
-rfv
{}
1>&2
\+
fi
fi
tempdir
=
$(
parse_cnf mysqld log-bin
""
)
tempdir
=
$(
parse_cnf
--
mysqld
log-bin
""
)
if
[[
-n
${
tempdir
:-}
]]
;
then
binlog_dir
=
$(
dirname
$tempdir
)
binlog_file
=
$(
basename
$tempdir
)
...
...
@@ -1061,7 +1073,7 @@ then
wsrep_log_info
"Compressed qpress files found"
if
[[
!
-x
`
which qpress
`
]]
;
then
if
!
command
-v
qpress
>
/dev/null
;
then
wsrep_log_error
"qpress not found in path:
$PATH
"
exit
22
fi
...
...
scripts/wsrep_sst_rsync.sh
View file @
3ea49d35
...
...
@@ -169,10 +169,7 @@ if [ ! -z "$INNODB_DATA_HOME_DIR_ARG" ]; then
fi
# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
if
[
-z
"
$INNODB_DATA_HOME_DIR
"
]
;
then
INNODB_DATA_HOME_DIR
=
$(
parse_cnf mysqld
$WSREP_SST_OPT_SUFFIX_VALUE
innodb-data-home-dir
''
)
fi
if
[
-z
"
$INNODB_DATA_HOME_DIR
"
]
;
then
INNODB_DATA_HOME_DIR
=
$(
parse_cnf
--mysqld
innodb-data-home-dir
""
)
INNODB_DATA_HOME_DIR
=
$(
parse_cnf
--mysqld
innodb-data-home-dir
''
)
fi
if
[
-n
"
$INNODB_DATA_HOME_DIR
"
]
;
then
...
...
scripts/wsrep_sst_xtrabackup-v2.sh
View file @
3ea49d35
...
...
@@ -905,9 +905,6 @@ if [ ! -z "$INNODB_DATA_HOME_DIR_ARG" ]; then
INNODB_DATA_HOME_DIR
=
$INNODB_DATA_HOME_DIR_ARG
fi
# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
if
[
-z
"
$INNODB_DATA_HOME_DIR
"
]
;
then
INNODB_DATA_HOME_DIR
=
$(
parse_cnf mysqld
$WSREP_SST_OPT_SUFFIX_VALUE
innodb-data-home-dir
''
)
fi
if
[
-z
"
$INNODB_DATA_HOME_DIR
"
]
;
then
INNODB_DATA_HOME_DIR
=
$(
parse_cnf
--mysqld
innodb-data-home-dir
""
)
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment