mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge commit '10.4' into 10.5
This commit is contained in:
@@ -9,7 +9,6 @@ source include/have_innodb.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
let $engine_type= InnoDB;
|
||||
#let $engine_type= MyISAM;
|
||||
|
||||
# Suppress warnings that might be generated during the test
|
||||
connection master;
|
||||
@@ -94,7 +93,6 @@ enable_query_log;
|
||||
echo [ status of semi-sync on master should be OFF ];
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
|
||||
# reset master to make sure the following test will start with a clean environment
|
||||
@@ -201,16 +199,23 @@ connection slave;
|
||||
source include/stop_slave.inc;
|
||||
|
||||
connection master;
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
|
||||
# The first semi-sync check should be on because after slave stop,
|
||||
# there are no transactions on the master.
|
||||
echo [ master status should be ON ];
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
|
||||
let $status_var= Rpl_semi_sync_master_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
|
||||
let $status_var= Rpl_semi_sync_master_clients;
|
||||
let $status_var_value= 0;
|
||||
source include/wait_for_status_var.inc;
|
||||
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
|
||||
echo [ semi-sync replication of these transactions will fail ];
|
||||
insert into t1 values (500);
|
||||
@@ -225,7 +230,6 @@ source include/wait_for_status_var.inc;
|
||||
echo [ master status should be OFF ];
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
|
||||
# Semi-sync status on master is now OFF, so all these transactions
|
||||
@@ -246,7 +250,6 @@ insert into t1 values (100);
|
||||
echo [ master status should be OFF ];
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
|
||||
--echo #
|
||||
@@ -274,9 +277,11 @@ connection master;
|
||||
|
||||
# The master semi-sync status should be on again after slave catches up.
|
||||
echo [ master status should be ON again after slave catches up ];
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
|
||||
let $status_var= Rpl_semi_sync_master_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
|
||||
@@ -332,11 +337,7 @@ replace_result $engine_type ENGINE_TYPE;
|
||||
eval create table t1 (a int) engine = $engine_type;
|
||||
drop table t1;
|
||||
|
||||
##show status like 'Rpl_semi_sync_master_status';
|
||||
|
||||
sync_slave_with_master;
|
||||
--replace_column 2 #
|
||||
show status like 'Rpl_relay%';
|
||||
|
||||
echo [ test reset master ];
|
||||
connection master;
|
||||
@@ -353,19 +354,7 @@ source include/stop_slave.inc;
|
||||
reset slave;
|
||||
|
||||
# Kill the dump thread on master for previous slave connection and
|
||||
# wait for it to exit
|
||||
connection master;
|
||||
let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
|
||||
if ($_tid)
|
||||
{
|
||||
--replace_result $_tid _tid
|
||||
eval kill query $_tid;
|
||||
|
||||
# After dump thread exit, Rpl_semi_sync_master_clients will be 0
|
||||
let $status_var= Rpl_semi_sync_master_clients;
|
||||
let $status_var_value= 0;
|
||||
source include/wait_for_status_var.inc;
|
||||
}
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
|
||||
connection slave;
|
||||
source include/start_slave.inc;
|
||||
@@ -404,17 +393,7 @@ connection master;
|
||||
reset master;
|
||||
|
||||
# Kill the dump thread on master for previous slave connection and wait for it to exit
|
||||
let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
|
||||
if ($_tid)
|
||||
{
|
||||
--replace_result $_tid _tid
|
||||
eval kill query $_tid;
|
||||
|
||||
# After dump thread exit, Rpl_semi_sync_master_clients will be 0
|
||||
let $status_var= Rpl_semi_sync_master_clients;
|
||||
let $status_var_value= 0;
|
||||
source include/wait_for_status_var.inc;
|
||||
}
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
|
||||
# Do not binlog the following statement because it will generate
|
||||
# different events for ROW and STATEMENT format
|
||||
@@ -459,21 +438,16 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
||||
connection master;
|
||||
|
||||
# Kill the dump thread on master for previous slave connection and wait for it to exit
|
||||
let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
|
||||
if ($_tid)
|
||||
{
|
||||
--replace_result $_tid _tid
|
||||
eval kill query $_tid;
|
||||
|
||||
# After dump thread exit, Rpl_semi_sync_master_clients will be 0
|
||||
let $status_var= Rpl_semi_sync_master_clients;
|
||||
let $status_var_value= 0;
|
||||
source include/wait_for_status_var.inc;
|
||||
}
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
|
||||
echo [ Semi-sync status on master should be ON ];
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
let $status_var= Rpl_semi_sync_master_clients;
|
||||
let $status_var_value= 0;
|
||||
source include/wait_for_status_var.inc;
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
let $status_var= Rpl_semi_sync_master_status;
|
||||
let $status_var_value= ON;
|
||||
source include/wait_for_status_var.inc;
|
||||
set global rpl_semi_sync_master_enabled= 0;
|
||||
|
||||
connection slave;
|
||||
|
@@ -4,5 +4,8 @@ connect con1,localhost,root,,;
|
||||
CREATE TEMPORARY TABLE tmp (a INT);
|
||||
CREATE TABLE non_existing_db.t SELECT 1 AS b;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
connection master;
|
||||
connection slave;
|
||||
connection slave;
|
||||
include/assert.inc ["Slave_open_temp_tables count should be 0"]
|
||||
include/rpl_end.inc
|
@@ -164,20 +164,15 @@ connection slave;
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
[ master status should be ON ]
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 0
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_yes_tx 14
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 0
|
||||
[ semi-sync replication of these transactions will fail ]
|
||||
insert into t1 values (500);
|
||||
[ master status should be OFF ]
|
||||
@@ -235,9 +230,6 @@ max(a)
|
||||
500
|
||||
connection master;
|
||||
[ master status should be ON again after slave catches up ]
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 12
|
||||
@@ -304,8 +296,6 @@ connection master;
|
||||
create table t1 (a int) engine = ENGINE_TYPE;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
show status like 'Rpl_relay%';
|
||||
Variable_name Value
|
||||
[ test reset master ]
|
||||
connection master;
|
||||
reset master;
|
||||
@@ -321,7 +311,7 @@ Rpl_semi_sync_master_yes_tx 0
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
@@ -353,6 +343,7 @@ include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
reset master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set sql_log_bin=0;
|
||||
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
|
||||
flush privileges;
|
||||
@@ -403,10 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status OFF
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
[ Semi-sync status on master should be ON ]
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 0
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
|
@@ -165,20 +165,15 @@ connection slave;
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
[ master status should be ON ]
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 0
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_yes_tx 16
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 0
|
||||
[ semi-sync replication of these transactions will fail ]
|
||||
insert into t1 values (500);
|
||||
[ master status should be OFF ]
|
||||
@@ -236,9 +231,6 @@ max(a)
|
||||
500
|
||||
connection master;
|
||||
[ master status should be ON again after slave catches up ]
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 12
|
||||
@@ -305,8 +297,6 @@ connection master;
|
||||
create table t1 (a int) engine = ENGINE_TYPE;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
show status like 'Rpl_relay%';
|
||||
Variable_name Value
|
||||
[ test reset master ]
|
||||
connection master;
|
||||
reset master;
|
||||
@@ -322,7 +312,7 @@ Rpl_semi_sync_master_yes_tx 0
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
@@ -354,6 +344,7 @@ include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
reset master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set sql_log_bin=0;
|
||||
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
|
||||
flush privileges;
|
||||
@@ -404,10 +395,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status OFF
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
[ Semi-sync status on master should be ON ]
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 0
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
|
@@ -165,20 +165,15 @@ connection slave;
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
[ master status should be ON ]
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 0
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_yes_tx 14
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 0
|
||||
[ semi-sync replication of these transactions will fail ]
|
||||
insert into t1 values (500);
|
||||
[ master status should be OFF ]
|
||||
@@ -236,9 +231,6 @@ max(a)
|
||||
500
|
||||
connection master;
|
||||
[ master status should be ON again after slave catches up ]
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 12
|
||||
@@ -305,8 +297,6 @@ connection master;
|
||||
create table t1 (a int) engine = ENGINE_TYPE;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
show status like 'Rpl_relay%';
|
||||
Variable_name Value
|
||||
[ test reset master ]
|
||||
connection master;
|
||||
reset master;
|
||||
@@ -322,7 +312,7 @@ Rpl_semi_sync_master_yes_tx 0
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
@@ -354,6 +344,7 @@ include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
reset master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set sql_log_bin=0;
|
||||
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
|
||||
flush privileges;
|
||||
@@ -404,10 +395,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status OFF
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
[ Semi-sync status on master should be ON ]
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 0
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
|
@@ -17,15 +17,25 @@
|
||||
# MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event /
|
||||
# THD::log_events_and_free_tmp_shares
|
||||
|
||||
--source include/have_binlog_format_mixed_or_statement.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
--connect (con1,localhost,root,,)
|
||||
|
||||
CREATE TEMPORARY TABLE tmp (a INT);
|
||||
|
||||
--send CREATE TABLE non_existing_db.t SELECT 1 AS b
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
--connection master
|
||||
--let $wait_binlog_event= DROP
|
||||
--source include/wait_for_binlog_event.inc
|
||||
sync_slave_with_master;
|
||||
|
||||
--connection slave
|
||||
--let $open_temp_tbl_count=query_get_value(show status like 'Slave_open_temp_tables', Value, 1)
|
||||
--let $assert_cond= "open_temp_tbl_count" = 0
|
||||
--let $assert_text= "Slave_open_temp_tables count should be 0"
|
||||
--source include/assert.inc
|
||||
|
||||
--source include/rpl_end.inc
|
@@ -436,6 +436,9 @@ SET @@DEBUG_SYNC='now SIGNAL proceed_by_1000';
|
||||
--connection spoiler_21
|
||||
ROLLBACK;
|
||||
|
||||
--let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE '%debug sync point%';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo # Release the 2nd worker to proceed
|
||||
--connection spoiler_22
|
||||
ROLLBACK;
|
||||
|
Reference in New Issue
Block a user