mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.4 to 10.5
This commit is contained in:
@@ -16,7 +16,6 @@ rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition
|
||||
rpl_row_binlog_max_cache_size : MDEV-11092
|
||||
rpl_row_index_choice : MDEV-11666
|
||||
rpl_semi_sync_after_sync : fails after MDEV-16172
|
||||
rpl_slave_grp_exec: MDEV-10514
|
||||
rpl_auto_increment_update_failure : disabled for now
|
||||
rpl_current_user : waits for MDEV-22374 fix
|
||||
rpl_parallel2 : waits for MDEV-23089
|
||||
|
@@ -3,20 +3,66 @@ include/master-slave.inc
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("table or database name 'mysqltest-1'");
|
||||
connection master;
|
||||
DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `mysqltest-1`;
|
||||
connection slave;
|
||||
connection master;
|
||||
connection slave;
|
||||
connection master;
|
||||
Master position is not changed
|
||||
connection slave;
|
||||
STOP SLAVE SQL_THREAD;
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET @old_slow_log_state = @@global.slow_query_log;
|
||||
SET @old_log_output = @@global.log_output;
|
||||
SET GLOBAL general_log = 'ON';
|
||||
SET GLOBAL slow_query_log = 'ON';
|
||||
SET GLOBAL log_output = 'FILE';
|
||||
connection master;
|
||||
ALTER TABLE mysql.slow_log DROP COLUMN thread_id, DROP COLUMN rows_affected;
|
||||
DROP DATABASE `mysqltest-1`;
|
||||
connection slave;
|
||||
connection slave;
|
||||
SHOW CREATE TABLE mysql.slow_log;
|
||||
Table Create Table
|
||||
slow_log CREATE TABLE `slow_log` (
|
||||
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`query_time` time(6) NOT NULL,
|
||||
`lock_time` time(6) NOT NULL,
|
||||
`rows_sent` int(11) NOT NULL,
|
||||
`rows_examined` int(11) NOT NULL,
|
||||
`db` varchar(512) NOT NULL,
|
||||
`last_insert_id` int(11) NOT NULL,
|
||||
`insert_id` int(11) NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`sql_text` mediumtext NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
|
||||
connection master;
|
||||
connection master;
|
||||
Master position has been changed
|
||||
DROP DATABASE `mysqltest-1`;
|
||||
connection slave;
|
||||
DROP DATABASE `#mysql50#mysqltest-1`;
|
||||
connection slave;
|
||||
SHOW CREATE TABLE mysql.slow_log;
|
||||
Table Create Table
|
||||
slow_log CREATE TABLE `slow_log` (
|
||||
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`query_time` time(6) NOT NULL,
|
||||
`lock_time` time(6) NOT NULL,
|
||||
`rows_sent` int(11) NOT NULL,
|
||||
`rows_examined` int(11) NOT NULL,
|
||||
`db` varchar(512) NOT NULL,
|
||||
`last_insert_id` int(11) NOT NULL,
|
||||
`insert_id` int(11) NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`sql_text` mediumtext NOT NULL,
|
||||
`thread_id` bigint(21) unsigned NOT NULL,
|
||||
`rows_affected` int(11) NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
|
||||
SET GLOBAL general_log = 'OFF';
|
||||
SET GLOBAL slow_query_log = 'OFF';
|
||||
truncate mysql.slow_log;
|
||||
truncate mysql.general_log;
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
SET GLOBAL slow_query_log = @old_slow_log_state;
|
||||
SET GLOBAL log_output = @old_log_output;
|
||||
include/rpl_end.inc
|
||||
|
@@ -5,10 +5,12 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time before the query]
|
||||
[Connection ID of the slave I/O thread found]
|
||||
kill <connection_id>;
|
||||
include/wait_for_slave_io_to_stop.inc
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time after the query]
|
||||
[Killing of the slave IO thread was successful]
|
||||
START SLAVE IO_THREAD;
|
||||
include/wait_for_slave_io_to_start.inc
|
||||
connection master;
|
||||
create table t1 (a int primary key);
|
||||
connection slave;
|
||||
|
@@ -55,8 +55,17 @@ FLUSH BINARY LOGS;
|
||||
--let $purge_to_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||
--eval PURGE BINARY LOGS TO '$purge_to_binlog';
|
||||
# with final removal of the extra domain
|
||||
###adding to debug info to catch the failure (1076):
|
||||
--error 0,1076
|
||||
--eval FLUSH BINARY LOGS DELETE_DOMAIN_ID=($extra_domain_id)
|
||||
|
||||
if ($mysql_errno == 1076) {
|
||||
--echo ### Failure "Could not delete gtid domain"
|
||||
--source include/show_rpl_debug_info.inc
|
||||
}
|
||||
|
||||
SELECT @@global.gtid_binlog_pos, @@global.gtid_binlog_state;
|
||||
|
||||
--connection slave
|
||||
SELECT @@global.gtid_slave_pos;
|
||||
# start the slave sucessfully
|
||||
|
@@ -14,8 +14,7 @@ call mtr.add_suppression("table or database name 'mysqltest-1'");
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `#mysql50#mysqltest-1`;
|
||||
CREATE DATABASE `mysqltest-1`;
|
||||
--enable_warnings
|
||||
sync_slave_with_master;
|
||||
|
||||
@@ -34,13 +33,25 @@ if ($before_position == $after_position)
|
||||
echo Master position is not changed;
|
||||
}
|
||||
|
||||
#Some log events of the mysql_upgrade's will cause errors on slave.
|
||||
# Some log events of the mysql_upgrade previously caused errors on slave,
|
||||
# however with MDEV-4851 this should be ok, so we test it:
|
||||
connection slave;
|
||||
STOP SLAVE SQL_THREAD;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
SET @old_general_log_state = @@global.general_log;
|
||||
SET @old_slow_log_state = @@global.slow_query_log;
|
||||
SET @old_log_output = @@global.log_output;
|
||||
SET GLOBAL general_log = 'ON';
|
||||
SET GLOBAL slow_query_log = 'ON';
|
||||
SET GLOBAL log_output = 'FILE';
|
||||
|
||||
connection master;
|
||||
#With '--force' option, mysql_upgrade always executes all sql statements for upgrading.
|
||||
ALTER TABLE mysql.slow_log DROP COLUMN thread_id, DROP COLUMN rows_affected;
|
||||
DROP DATABASE `mysqltest-1`;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
SHOW CREATE TABLE mysql.slow_log;
|
||||
connection master;
|
||||
--exec $MYSQL_UPGRADE --skip-verbose --write-binlog --force --user=root > $MYSQLTEST_VARDIR/log/mysql_upgrade.log 2>&1
|
||||
|
||||
let $datadir= `select @@datadir`;
|
||||
@@ -55,8 +66,15 @@ if ($before_position != $after_position)
|
||||
echo Master position has been changed;
|
||||
}
|
||||
|
||||
DROP DATABASE `mysqltest-1`;
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
DROP DATABASE `#mysql50#mysqltest-1`;
|
||||
--let $rpl_only_running_threads= 1
|
||||
SHOW CREATE TABLE mysql.slow_log;
|
||||
SET GLOBAL general_log = 'OFF';
|
||||
SET GLOBAL slow_query_log = 'OFF';
|
||||
truncate mysql.slow_log;
|
||||
truncate mysql.general_log;
|
||||
SET GLOBAL general_log = @old_general_log_state;
|
||||
SET GLOBAL slow_query_log = @old_slow_log_state;
|
||||
SET GLOBAL log_output = @old_log_output;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
@@ -101,7 +101,9 @@ TRUNCATE t3;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (a);
|
||||
ALTER TABLE t2 ADD PRIMARY KEY (a);
|
||||
ALTER TABLE t3 ADD PRIMARY KEY (a);
|
||||
--sync_slave_with_master
|
||||
|
||||
#--sync_slave_with_master
|
||||
--connection slave
|
||||
RENAME TABLE t3 TO t3_bak;
|
||||
|
||||
--connection master
|
||||
@@ -146,7 +148,7 @@ ALTER TABLE t1 ENGINE=InnoDB;
|
||||
ALTER TABLE t2 ENGINE=InnoDB;
|
||||
ALTER TABLE t3 ENGINE=InnoDB;
|
||||
|
||||
--connection slave
|
||||
--sync_slave_with_master
|
||||
RENAME TABLE t3 TO t3_bak;
|
||||
|
||||
--connection master
|
||||
|
@@ -38,8 +38,8 @@ set @time_before_kill := (select CURRENT_TIMESTAMP);
|
||||
|
||||
--replace_regex /kill [0-9]*/kill <connection_id>/
|
||||
--eval kill $connection_id
|
||||
let $wait_condition= SELECT COUNT(*) = 0 FROM information_schema.processlist where id=$connection_id;
|
||||
--source include/wait_condition.inc
|
||||
--source include/wait_for_slave_io_to_stop.inc
|
||||
|
||||
set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
|
||||
--echo [Time after the query]
|
||||
@@ -52,6 +52,7 @@ if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
|
||||
--echo [Killing of the slave IO thread was successful]
|
||||
|
||||
START SLAVE IO_THREAD;
|
||||
--source include/wait_for_slave_io_to_start.inc
|
||||
|
||||
# Ensure that the slave io thread started properly
|
||||
connection master;
|
||||
|
Reference in New Issue
Block a user