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
2a935329
Commit
2a935329
authored
Feb 19, 2019
by
Igor Babaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4' into bb-10.4-mdev7486
parents
2e73c561
ddc98339
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
156 additions
and
9 deletions
+156
-9
mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
+1
-2
mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
...l-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
+94
-2
mysql-test/suite/galera_3nodes/t/galera_garbd.test
mysql-test/suite/galera_3nodes/t/galera_garbd.test
+27
-3
mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test
mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test
+32
-2
sql/sql_repl.cc
sql/sql_repl.cc
+2
-0
No files found.
mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
View file @
2a935329
...
...
@@ -13,8 +13,7 @@ gtid_ignore_duplicates
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
# wsrep-causal-reads=ON
# wsrep-sync-wait=15
wsrep-sync-wait=15
[mysqld.1]
#galera_port=@OPT.port
...
...
mysql-test/suite/galera_3nodes/r/galera_gtid_2_cluster.result
View file @
2a935329
connection node_2;
connection node_1;
connection node_1;
cluster 1 node 1
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 3
connection node_2;
cluster 1 node 2
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 3
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;
cluster 1 node 3
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 3
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_4;
cluster 2 node 1
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 3
connect node_5, 127.0.0.1, root, , test, $NODE_MYPORT_5;
connection node_5;
cluster 2 node 2
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 3
connect node_6, 127.0.0.1, root, , test, $NODE_MYPORT_6;
connection node_6;
cluster 2 node 3
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 3
connection node_1;
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_4, master_use_gtid=current_pos, ignore_server_ids=(12,13);;
start slave;
include/wait_for_slave_to_start.inc
...
...
@@ -31,6 +44,7 @@ select @@gtid_binlog_state;
select @@gtid_slave_pos;
@@gtid_slave_pos
connection node_4;
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos, ignore_server_ids=(22,23);;
start slave;
include/wait_for_slave_to_start.inc
...
...
@@ -41,15 +55,19 @@ select @@gtid_slave_pos;
@@gtid_slave_pos
cluster 1 node 1
connection node_1;
create table t1 (cluster_domain_id int ,node_server_id int, seq_no int);
insert into t1 values (1, 11, 2);
select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 2 node 1
connection node_4;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2
...
...
@@ -62,9 +80,12 @@ cluster_domain_id node_server_id seq_no
1 11 2
2 21 1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 1 node 2
connection node_2;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2,2-21-1
...
...
@@ -73,9 +94,12 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2,1-12-3,2-21-1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 1 node 3
connection node_3;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2,1-12-3,2-21-1
...
...
@@ -84,9 +108,12 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 2 node 2
connection node_5;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1
...
...
@@ -95,9 +122,12 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
connection node_1;
include/sync_with_master_gtid.inc
cluster 2 node 3
connection node_6;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
...
...
@@ -106,28 +136,53 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
connection node_1;
include/sync_with_master_gtid.inc
cluster 1 node 1
connection node_1;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
drop table t1;
stop slave;
reset slave;
cluster 2 node 1
connection node_4;
stop slave;
reset slave;
cluster 1 node 1
connection node_1;
change master to master_use_gtid=no, ignore_server_ids=();
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
cluster 2 node 1
stop slave;
reset slave;
connection node_4;
change master to master_use_gtid=no, ignore_server_ids=();
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_3;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_5;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_6;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_1;
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_6, master_use_gtid=current_pos, ignore_server_ids=(12,13);;
start slave;
include/wait_for_slave_to_start.inc
...
...
@@ -137,6 +192,7 @@ select @@gtid_binlog_state;
select @@gtid_slave_pos;
@@gtid_slave_pos
connection node_4;
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_3, master_use_gtid=current_pos, ignore_server_ids=(22,23);;
start slave;
include/wait_for_slave_to_start.inc
...
...
@@ -147,15 +203,19 @@ select @@gtid_slave_pos;
@@gtid_slave_pos
cluster 1 node 1
connection node_1;
create table t1 (cluster_domain_id int ,node_server_id int, seq_no int);
insert into t1 values (1, 11, 2);
select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 2 node 1
connection node_4;
insert into t1 values (2, 21, 1);
select @@gtid_binlog_state;
@@gtid_binlog_state
...
...
@@ -165,9 +225,12 @@ cluster_domain_id node_server_id seq_no
1 11 2
2 21 1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 1 node 2
connection node_2;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2,2-21-1
...
...
@@ -176,9 +239,12 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2,1-12-3,2-21-1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 1 node 3
connection node_3;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-11-2,1-12-3,2-21-1
...
...
@@ -187,9 +253,12 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1
#wait for sync cluster 1 and 2
connection node_1;
include/save_master_gtid.inc
connection node_4;
include/sync_with_master_gtid.inc
cluster 2 node 2
connection node_5;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1
...
...
@@ -198,9 +267,12 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
connection node_1;
include/sync_with_master_gtid.inc
cluster 2 node 3
connection node_6;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
...
...
@@ -209,23 +281,43 @@ select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
#wait for sync cluster 2 and 1
connection node_4;
include/save_master_gtid.inc
connection node_1;
include/sync_with_master_gtid.inc
cluster 1 node 1
connection node_1;
select @@gtid_binlog_state;
@@gtid_binlog_state
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
drop table t1;
stop slave;
change master to master_use_gtid=no, ignore_server_ids=();
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
cluster 2 node 1
connection node_4;
stop slave;
change master to master_use_gtid=no, ignore_server_ids=();
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
set global GTID_SLAVE_POS="";
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_3;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_5;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_6;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
mysql-test/suite/galera_3nodes/t/galera_garbd.test
View file @
2a935329
...
...
@@ -29,9 +29,33 @@
--
source
include
/
wait_condition
.
inc
--
echo
Starting
garbd
...
--
let
$gp1
=
`SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
--
let
$galera_port_1
=
`SELECT SUBSTR('$gp1', 1, LOCATE(';', '$gp1') - 1)`
--
exec
`dirname $WSREP_PROVIDER`
/../../
bin
/
garb
/
garbd
--
address
"gcomm://127.0.0.1:
$galera_port_1
"
--
group
my_wsrep_cluster
--
options
'base_port=$galera_port_3'
>
$MYSQL_TMP_DIR
/
garbd
.
log
2
>&
1
&
--
perl
use
strict
;
use
File
::Basename
;
my
$provider_dirname
=
dirname
(
$ENV
{
WSREP_PROVIDER
});
# Array of possible garbd executable paths to be checked
# base is $provider_dirname
my
@
garbd_executable_search
=
(
# WSREP_PROVIDER is set in galera repository
$
{
provider_dirname
}
.
"/garb/garbd"
,
# MariaDB (PR #1147)
$
{
provider_dirname
}
.
"/../../bin/garb/garbd"
);
my
$garbd_executable
=
''
;
foreach
my
$garbd
(
@
garbd_executable_search
)
{
if
(
-
f
$garbd
)
{
$garbd_executable
=
$garbd
;
}
}
if
(
$garbd_executable
eq
''
)
{
die
(
"Didn't locate garbd
\n
"
);
}
die
unless
open
(
FILE
,
">
$ENV
{
MYSQLTEST_VARDIR
}
/tmp/garbd.inc"
);
print
FILE
"--exec
$garbd_executable
--address
\"
gcomm://127.0.0.1:
\$
NODE_GALERAPORT_1
\"
--group my_wsrep_cluster --options 'base_port=
\$
NODE_GALERAPORT_3' >
\$
MYSQL_TMP_DIR/garbd.log 2>&1 &
\n
"
;
close
(
FILE
);
EOF
--
source
$MYSQLTEST_VARDIR
/
tmp
/
garbd
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
garbd
.
inc
--
sleep
5
...
...
mysql-test/suite/galera_3nodes/t/galera_gtid_2_cluster.test
View file @
2a935329
...
...
@@ -138,27 +138,45 @@ select @@gtid_binlog_state;
drop
table
t1
;
stop
slave
;
reset
slave
;
--
echo
cluster
2
node
1
--
connection
node_4
stop
slave
;
reset
slave
;
--
echo
cluster
1
node
1
--
connection
node_1
change
master
to
master_use_gtid
=
no
,
ignore_server_ids
=
();
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
set
global
GTID_SLAVE_POS
=
""
;
--
sleep
2
--
echo
cluster
2
node
1
--
connection
node_4
stop
slave
;
reset
slave
;
change
master
to
master_use_gtid
=
no
,
ignore_server_ids
=
();
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
set
global
GTID_SLAVE_POS
=
""
;
--
connection
node_2
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
--
connection
node_3
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
--
connection
node_5
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
--
connection
node_6
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
#--enable_parsing
#
# This test creates 2x 3 nodes galera cluster.
...
...
@@ -272,21 +290,33 @@ select @@gtid_binlog_state;
drop
table
t1
;
stop
slave
;
change
master
to
master_use_gtid
=
no
,
ignore_server_ids
=
();
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
set
global
GTID_SLAVE_POS
=
""
;
--
echo
cluster
2
node
1
--
connection
node_4
stop
slave
;
change
master
to
master_use_gtid
=
no
,
ignore_server_ids
=
();
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
set
global
GTID_SLAVE_POS
=
""
;
--
connection
node_2
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
--
connection
node_3
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
--
connection
node_5
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
--
connection
node_6
set
global
wsrep_on
=
OFF
;
reset
master
;
set
global
wsrep_on
=
ON
;
sql/sql_repl.cc
View file @
2a935329
...
...
@@ -3369,6 +3369,7 @@ static my_bool kill_callback(THD *thd, kill_callback_arg *arg)
thd
->
variables
.
server_id
==
arg
->
slave_server_id
)
{
arg
->
thd
=
thd
;
if
(
WSREP
(
thd
))
mysql_mutex_lock
(
&
thd
->
LOCK_thd_data
);
mysql_mutex_lock
(
&
thd
->
LOCK_thd_kill
);
// Lock from delete
return
1
;
}
...
...
@@ -3390,6 +3391,7 @@ void kill_zombie_dump_threads(uint32 slave_server_id)
*/
arg
.
thd
->
awake_no_mutex
(
KILL_SLAVE_SAME_ID
);
mysql_mutex_unlock
(
&
arg
.
thd
->
LOCK_thd_kill
);
if
(
WSREP
(
arg
.
thd
))
mysql_mutex_unlock
(
&
arg
.
thd
->
LOCK_thd_data
);
}
}
...
...
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