1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-31857 enable --ssl-verify-server-cert by default in the internal client

enable ssl + ssl_verify_server_cert in the internal client too

* fix replication tests to disable master_ssl_verify_server_cert
  because accounts are passwordless - except rpl.rpl_ssl1
* fix federated/federatedx/connect to disable SSL_VERIFY_SERVER_CERT
  because they cannot configure an ssl connection
* fix spider to disable ssl_verify_server_cert, if configuration
  says so, as spider _can_ configure an ssl connection
* memory leak in embedded test-connect
This commit is contained in:
Sergei Golubchik
2023-09-04 15:32:36 +02:00
parent e0c30390a7
commit abcd23add2
132 changed files with 276 additions and 259 deletions

View File

@@ -38,7 +38,8 @@ change master 'abc2' to master_host='';
eval change master 'master1' to
master_port=$SERVER_MYPORT_1,
master_host='127.0.0.1',
master_user='root';
master_user='root',
master_ssl_verify_server_cert=0;
start slave 'master1';
set default_master_connection = 'master1';
@@ -160,6 +161,7 @@ eval change master to
master_port=$SERVER_MYPORT_2,
master_host='127.0.0.1',
master_user='root',
master_ssl_verify_server_cert=0,
master_use_gtid=no;
start slave;

View File

@@ -29,7 +29,7 @@ if (`SELECT strcmp("$ignore_domain_ids","") != 0`)
--echo # gtid_current_pos calculation
--let $current_pos= `SELECT @@gtid_current_pos`
--replace_result $SLAVE_MYPORT SLAVE_PORT
--eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SLAVE_MYPORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 $extra_cm_args
--eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SLAVE_MYPORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 $extra_cm_args
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
--let $slave_pos= `SELECT @@gtid_slave_pos`
--echo # Validating gtid_slave_pos == gtid_binlog_pos..

View File

@@ -38,6 +38,6 @@ drop database mysqltest1;
connection slave;
stop slave;
change master to master_user='root';
start slave;
include/start_slave.inc
include/rpl_end.inc
drop user rpl@localhost;

View File

@@ -16,4 +16,5 @@ n
connection master;
drop table t1;
connection slave;
include/wait_for_slave_to_start.inc
include/rpl_end.inc

View File

@@ -24,7 +24,7 @@ GTID_CURRENT_POS
GTID_SLAVE_POS
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 ;
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS
@@ -90,7 +90,7 @@ GTID_CURRENT_POS 0-1-2
GTID_SLAVE_POS
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 ;
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-2
@@ -149,7 +149,7 @@ GTID_CURRENT_POS 0-1-6
GTID_SLAVE_POS 0-2-5
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 ;
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-6
@@ -210,7 +210,7 @@ GTID_CURRENT_POS 0-1-10
GTID_SLAVE_POS 0-1-10
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 ;
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-10
@@ -274,7 +274,7 @@ GTID_CURRENT_POS 0-1-14,1-1-2
GTID_SLAVE_POS 0-2-13
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 ;
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-14,1-1-2
@@ -356,7 +356,7 @@ GTID_CURRENT_POS 0-1-18,1-1-2,2-1-2
GTID_SLAVE_POS 0-1-18,1-1-2
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 ;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 ;
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-18,1-3-4,2-1-2,4-3-2
@@ -421,7 +421,7 @@ GTID_CURRENT_POS 0-2-21,1-3-4,2-1-3,3-1-2,4-3-2
GTID_SLAVE_POS 0-2-21,1-3-4,2-1-2,4-3-2
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-18,1-3-4,2-1-3,3-1-2,4-3-2
@@ -520,7 +520,7 @@ GTID_CURRENT_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
GTID_SLAVE_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2
@@ -585,7 +585,7 @@ GTID_CURRENT_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
GTID_SLAVE_POS 0-2-29,1-3-4,2-1-3,3-1-2,4-3-2
# First ensure gtid_slave_pos after master_demote_to_slave matches
# gtid_current_pos calculation
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos, master_demote_to_slave=1 , ignore_domain_ids=(2,3);
SELECT VARIABLE_NAME, GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'gtid_binlog_pos' OR VARIABLE_NAME LIKE 'gtid_slave_pos' OR VARIABLE_NAME LIKE 'gtid_current_pos' ORDER BY VARIABLE_NAME ASC;
VARIABLE_NAME GLOBAL_VALUE
GTID_BINLOG_POS 0-1-26,1-3-4,2-1-3,3-1-2,4-3-2

View File

@@ -30,7 +30,7 @@ include/sync_with_master_gtid.inc
connection server_1;
set @@global.gtid_strict_mode = true;
set @@global.rpl_semi_sync_slave_enabled = 1;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=SLAVE_POS;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
include/start_slave.inc
... is done.
## A. no out-of-order gtid error for own transaction made round trip

View File

@@ -8,5 +8,5 @@ START SLAVE;
include/wait_for_slave_io_error.inc [errno=1045, 1593]
include/stop_slave_sql.inc
CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
START SLAVE;
include/start_slave.inc
include/rpl_end.inc

View File

@@ -335,7 +335,8 @@ a b
*** Now let the old master join up as slave. ***
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user = "root", master_use_gtid = slave_pos, master_demote_to_slave=1;
master_user = "root", master_ssl_verify_server_cert=0,
master_use_gtid = slave_pos, master_demote_to_slave=1;
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a

View File

@@ -12,7 +12,8 @@ include/wait_for_slave_to_stop.inc
reset slave all;
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user='root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
master_user='root', master_ssl_verify_server_cert=0,
MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
include/start_slave.inc
include/wait_for_slave_to_start.inc
connection server_2;

View File

@@ -6,7 +6,7 @@ connection server_2;
create table t2 (i int);
connection server_3;
set default_master_connection = 'm2';
change master to master_host='127.0.0.1', master_port=SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos;
change master to master_host='127.0.0.1', master_port=SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
include/start_slave.inc
connection server_2;
insert into t2 values (1);

View File

@@ -44,7 +44,7 @@ RESET MASTER;
SET GLOBAL gtid_slave_pos= '0-2-10';
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user= 'root', master_use_gtid=CURRENT_POS;
master_user= 'root', master_ssl_verify_server_cert=0, master_use_gtid=CURRENT_POS;
Warnings:
Warning 1287 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
START SLAVE;

View File

@@ -20,8 +20,8 @@ a b
2 1
include/stop_slave.inc
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SLAVE_PORT,
master_user = 'root';
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SLAVE_PORT, master_ssl_verify_server_cert=0,
master_user = 'root', master_ssl_verify_server_cert=0;
START SLAVE;
include/wait_for_slave_to_start.inc
connection server_2;
@@ -50,7 +50,7 @@ INSERT INTO t1 VALUES (5, 1);
INSERT INTO t1 VALUES (6, 1);
include/save_master_gtid.inc
connection server_2;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, master_ssl_verify_server_cert=0;
START SLAVE;
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;

View File

@@ -51,7 +51,7 @@ connection master;
drop table if exists t1;
connection slave;
set @@global.slave_net_timeout= 10;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.5;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_ssl_verify_server_cert=0, master_heartbeat_period= 0.5;
show status like 'Slave_heartbeat_period';;
Variable_name Slave_heartbeat_period
Value 0.500

View File

@@ -24,7 +24,7 @@ Heartbeat event has received
*** Clean up ***
include/stop_slave.inc
CHANGE MASTER TO
MASTER_SSL=0,
MASTER_SSL=1,
MASTER_SSL_CA='',
MASTER_SSL_CERT='',
MASTER_SSL_KEY='';

View File

@@ -105,4 +105,4 @@ change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;

View File

@@ -60,4 +60,4 @@ change master to master_host='127.0.0.1';
Master-Host: 127.0.0.1
change master to master_host='0:0:0:0:0:0:0:1';
Master-Host: 0:0:0:0:0:0:0:1
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;

View File

@@ -27,7 +27,7 @@ NULL
connection slave;
include/stop_slave.inc
reset slave all;
change master 'my_slave' to master_port=MASTER_MYPORT, master_host='127.0.0.1', master_user='root';
change master 'my_slave' to master_port=MASTER_MYPORT, master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0;
set default_master_connection = 'my_slave';
include/start_slave.inc
# Call without connection name -- works (expected -1)

View File

@@ -10,7 +10,7 @@ include/stop_slave.inc
set @save_slave_parallel_workers= @@global.slave_parallel_workers;
set @save_slave_transaction_retries= @@global.slave_transaction_retries;
RESET SLAVE ALL;
CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos;
CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos, MASTER_SSL_VERIFY_SERVER_CERT=0;
SET default_master_connection='slave1';
SET @@global.slave_parallel_workers=1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;

View File

@@ -67,7 +67,7 @@ master_ssl_ca= '',
master_ssl_cert= '',
master_ssl_key= '',
master_ssl_verify_server_cert=0,
master_ssl=0,
master_ssl=1,
master_use_gtid=no;
include/start_slave.inc

View File

@@ -134,7 +134,7 @@ connection slave;
include/stop_slave.inc
include/reset_slave.inc
include/rpl_restart_server.inc [server_number=2]
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_USER='root';
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;
connection slave;
include/start_slave.inc
SELECT @@GLOBAL.replicate_rewrite_db;

View File

@@ -10,7 +10,7 @@ ERROR HY000: Could not initialize master info structure for ''; more error messa
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
reset slave;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_ssl_verify_server_cert=0;
connection master;
reset master;
connection slave;

View File

@@ -57,7 +57,7 @@ connection server_2;
set global rpl_semi_sync_master_enabled = 1;
set global rpl_semi_sync_master_wait_point=AFTER_SYNC;
connection server_1;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_use_gtid=SLAVE_POS;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
set global rpl_semi_sync_slave_enabled = 1;
set @@global.gtid_slave_pos=@@global.gtid_binlog_pos;
include/start_slave.inc
@@ -135,7 +135,7 @@ connection server_1;
set global rpl_semi_sync_master_enabled = 1;
set global rpl_semi_sync_master_wait_point=AFTER_SYNC;
connection server_2;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_use_gtid=SLAVE_POS;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
set global rpl_semi_sync_slave_enabled = 1;
set @@global.gtid_slave_pos=@@global.gtid_binlog_pos;
include/start_slave.inc
@@ -214,7 +214,7 @@ connection server_2;
set global rpl_semi_sync_master_enabled = 1;
set global rpl_semi_sync_master_wait_point=AFTER_SYNC;
connection server_1;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_use_gtid=SLAVE_POS;
CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
set global rpl_semi_sync_slave_enabled = 1;
set @@global.gtid_slave_pos=@@global.gtid_binlog_pos;
include/start_slave.inc

View File

@@ -344,6 +344,4 @@ SET GLOBAL rpl_semi_sync_master_enabled = 0;
DROP TABLE t1;
connection slave;
SET GLOBAL rpl_semi_sync_slave_enabled = 0;
stop slave;
start slave;
include/rpl_end.inc

View File

@@ -11,7 +11,9 @@ CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_USER
#
Connection_name = 'm1'
RESET SLAVE ALL;
CHANGE MASTER 'm1' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_USER='root';
CHANGE MASTER 'm1' TO MASTER_HOST='127.0.0.1',
MASTER_PORT=MASTER_MYPORT, MASTER_USER='root',
MASTER_SSL_VERIFY_SERVER_CERT=0;
SET STATEMENT default_master_connection = 'm1' FOR START SLAVE;
set default_master_connection = 'm1';
include/wait_for_slave_to_start.inc

View File

@@ -3,7 +3,7 @@ include/master-slave.inc
connect slave2,127.0.0.1,root,,test,$SLAVE_MYPORT2,;
connection slave2;
RESET SLAVE;
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_PORT,master_user='root';
CHANGE MASTER TO master_host='127.0.0.1',master_port=MASTER_PORT,master_user='root', master_ssl_verify_server_cert=0;
START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc
connection master;

View File

@@ -5,7 +5,7 @@ include/start_slave.inc
Warnings:
Note 1254 Slave is already running
set default_master_connection = 'm2';
change master to master_host='127.0.0.1', master_port=SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos;
change master to master_host='127.0.0.1', master_port=SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
include/start_slave.inc
select @@global.slave_parallel_workers as two;
two

View File

@@ -51,7 +51,7 @@ connection slave;
include/stop_slave.inc
CHANGE MASTER TO
master_user = 'root',
master_ssl = 0,
master_ssl = 1,
master_ssl_ca = '',
master_ssl_cert = '',
master_ssl_key = '';

View File

@@ -7,7 +7,7 @@ create table t1 (t int);
connection slave;
stop slave;
include/wait_for_slave_to_stop.inc
change master to master_user='replssl',master_password='';
change master to master_user='replssl',master_password='',master_ssl=0;
start slave;
connection master;
insert into t1 values (1);
@@ -108,7 +108,7 @@ master_ssl_ca ='',
master_ssl_cert='',
master_ssl_key='',
master_ssl_verify_server_cert=0,
master_ssl=0;
master_ssl=1;
connection master;
drop user replssl@127.0.0.1;
connection slave;

View File

@@ -110,10 +110,10 @@ set global binlog_alter_two_phase = 0;
SET GLOBAL debug_dbug= @old_debug_master;
set DEBUG_SYNC= 'RESET';
connection slave;
stop slave;
include/stop_slave.inc
set global slave_parallel_threads = 0;;
set global slave_parallel_mode = optimistic;;
set global gtid_strict_mode = 0;;
set DEBUG_SYNC= 'RESET';
start slave;
include/start_slave.inc
include/rpl_end.inc

View File

@@ -90,7 +90,7 @@ connection master;
INSERT INTO t1 VALUES (6);
include/save_master_gtid.inc
connection slave;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, MASTER_SSL=1;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;

View File

@@ -4,6 +4,6 @@ call mtr.add_suppression("Master is configured to log replication events");
connection slave;
connection slave;
include/wait_for_slave_to_stop.inc
start slave;
include/start_slave.inc
connection master;
include/rpl_end.inc

View File

@@ -33,7 +33,7 @@ drop database mysqltest1;
sync_slave_with_master;
stop slave;
change master to master_user='root';
start slave;
source include/start_slave.inc;
source include/rpl_end.inc;
drop user rpl@localhost;

View File

@@ -17,6 +17,7 @@ select n from t1;
connection master;
drop table t1;
sync_slave_with_master;
source include/wait_for_slave_to_start.inc;
# End of 4.1 tests
--source include/rpl_end.inc

View File

@@ -52,7 +52,7 @@ INSERT INTO t1(a) VALUES (1);
set @@global.gtid_strict_mode = true;
set @@global.rpl_semi_sync_slave_enabled = 1;
evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=SLAVE_POS;
evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
--source include/start_slave.inc
--echo ... is done.

View File

@@ -19,6 +19,6 @@ START SLAVE;
--source include/stop_slave_sql.inc
CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= '';
START SLAVE;
--source include/start_slave.inc
--source include/rpl_end.inc

View File

@@ -221,7 +221,8 @@ SELECT * FROM t4 ORDER BY a,b;
--connection server_1
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
master_user = "root", master_use_gtid = slave_pos, master_demote_to_slave=1;
master_user = "root", master_ssl_verify_server_cert=0,
master_use_gtid = slave_pos, master_demote_to_slave=1;
--source include/start_slave.inc
--sync_with_master
SELECT * FROM t1 ORDER BY a;

View File

@@ -24,7 +24,8 @@ reset slave all;
connection server_1;
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
master_user='root', MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
master_user='root', master_ssl_verify_server_cert=0,
MASTER_USE_GTID=SLAVE_POS, master_demote_to_slave=1;
source include/start_slave.inc;
source include/wait_for_slave_to_start.inc;

View File

@@ -13,7 +13,7 @@ create table t2 (i int);
set default_master_connection = 'm2';
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos;
eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--source include/start_slave.inc
--connection server_2

View File

@@ -59,7 +59,7 @@ SET GLOBAL gtid_slave_pos= '0-2-10';
--connection server_1
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
master_user= 'root', master_use_gtid=CURRENT_POS;
master_user= 'root', master_ssl_verify_server_cert=0, master_use_gtid=CURRENT_POS;
START SLAVE;
--connection server_2

View File

@@ -24,8 +24,8 @@ SELECT * FROM t1 ORDER BY a;
--connection server_1
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SLAVE_MYPORT,
master_user = 'root';
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SLAVE_MYPORT, master_ssl_verify_server_cert=0,
master_user = 'root', master_ssl_verify_server_cert=0;
START SLAVE;
--source include/wait_for_slave_to_start.inc
@@ -49,7 +49,7 @@ INSERT INTO t1 VALUES (6, 1);
--connection server_2
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT;
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT, master_ssl_verify_server_cert=0;
START SLAVE;
--source include/sync_with_master_gtid.inc

View File

@@ -107,7 +107,7 @@ connection slave;
set @@global.slave_net_timeout= 10;
--replace_result $MASTER_MYPORT MASTER_PORT
# no error this time but rather a warning
eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 0.5;
eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_ssl_verify_server_cert=0, master_heartbeat_period= 0.5;
--query_vertical show status like 'Slave_heartbeat_period';
start slave;

View File

@@ -49,7 +49,7 @@ let $status_var_comparsion= >;
--echo *** Clean up ***
--source include/stop_slave.inc
CHANGE MASTER TO
MASTER_SSL=0,
MASTER_SSL=1,
MASTER_SSL_CA='',
MASTER_SSL_CERT='',
MASTER_SSL_KEY='';

View File

@@ -60,4 +60,4 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
# clean up
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;

View File

@@ -46,4 +46,4 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
--echo Master-Host: $master_host
# clean up
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;

View File

@@ -34,7 +34,7 @@ select master_pos_wait('foo', 98);
--source include/stop_slave.inc
reset slave all;
--replace_result $MASTER_MYPORT MASTER_MYPORT
eval change master 'my_slave' to master_port=$MASTER_MYPORT, master_host='127.0.0.1', master_user='root';
eval change master 'my_slave' to master_port=$MASTER_MYPORT, master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0;
set default_master_connection = 'my_slave';
--source include/start_slave.inc

View File

@@ -52,7 +52,7 @@ set @save_slave_parallel_workers= @@global.slave_parallel_workers;
# to avoid warnings
set @save_slave_transaction_retries= @@global.slave_transaction_retries;
RESET SLAVE ALL;
evalp CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos;
evalp CHANGE MASTER 'slave1' TO MASTER_USER='root',MASTER_PORT=$MASTER_MYPORT, MASTER_HOST='127.0.0.1', MASTER_USE_GTID=slave_pos, MASTER_SSL_VERIFY_SERVER_CERT=0;
SET default_master_connection='slave1';
SET @@global.slave_parallel_workers=1;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;

View File

@@ -231,7 +231,7 @@ CHANGE MASTER TO
master_ssl_cert= '',
master_ssl_key= '',
master_ssl_verify_server_cert=0,
master_ssl=0,
master_ssl=1,
master_use_gtid=no;
--source include/start_slave.inc

View File

@@ -134,7 +134,7 @@ connection slave;
--let $rpl_server_number= 2
--source include/rpl_restart_server.inc
--replace_result $MASTER_MYPORT MASTER_MYPORT
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0;
# New value
connection slave;

View File

@@ -50,7 +50,7 @@ start slave;
eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root';
reset slave;
--replace_result $MASTER_MYPORT MASTER_PORT
eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root';
eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_ssl_verify_server_cert=0;
connection master;
reset master;
connection slave;

View File

@@ -106,7 +106,7 @@ if (`select $server_to_crash = 2`)
{
--let $master_port=$SERVER_MYPORT_1
}
evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_use_gtid=SLAVE_POS;
evalp CHANGE MASTER TO master_host='127.0.0.1', master_port=$new_master_port, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=SLAVE_POS;
set global rpl_semi_sync_slave_enabled = 1;
set @@global.gtid_slave_pos=@@global.gtid_binlog_pos;
--source include/start_slave.inc

View File

@@ -424,6 +424,5 @@ SET GLOBAL rpl_semi_sync_master_enabled = 0;
DROP TABLE t1;
connection slave;
SET GLOBAL rpl_semi_sync_slave_enabled = 0;
stop slave;start slave;
--source include/rpl_end.inc

View File

@@ -22,7 +22,9 @@ eval SET STATEMENT default_master_connection = 'm1' FOR
RESET SLAVE ALL;
--replace_result $MASTER_MYPORT MASTER_MYPORT
eval CHANGE MASTER 'm1' TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
eval CHANGE MASTER 'm1' TO MASTER_HOST='127.0.0.1',
MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root',
MASTER_SSL_VERIFY_SERVER_CERT=0;
SET STATEMENT default_master_connection = 'm1' FOR START SLAVE;
set default_master_connection = 'm1';

View File

@@ -15,7 +15,7 @@ connect (slave2,127.0.0.1,root,,test,$SLAVE_MYPORT2,);
connection slave2;
RESET SLAVE;
--replace_result $MASTER_MYPORT MASTER_PORT
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root'
--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root', master_ssl_verify_server_cert=0
START SLAVE IO_THREAD;
source include/wait_for_slave_io_to_start.inc;

View File

@@ -23,7 +23,7 @@ set default_master_connection = '';
set default_master_connection = 'm2';
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos;
eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--source include/start_slave.inc
select @@global.slave_parallel_workers as two;

View File

@@ -106,7 +106,7 @@ sync_slave_with_master;
--source include/stop_slave.inc
CHANGE MASTER TO
master_user = 'root',
master_ssl = 0,
master_ssl = 1,
master_ssl_ca = '',
master_ssl_cert = '',
master_ssl_key = '';

View File

@@ -16,7 +16,7 @@ sync_slave_with_master;
#trying to use this user without ssl
stop slave;
--source include/wait_for_slave_to_stop.inc
change master to master_user='replssl',master_password='';
change master to master_user='replssl',master_password='',master_ssl=0;
start slave;
#showing that replication don't work
@@ -131,7 +131,7 @@ CHANGE MASTER TO
master_ssl_cert='',
master_ssl_key='',
master_ssl_verify_server_cert=0,
master_ssl=0;
master_ssl=1;
connection master;
drop user replssl@127.0.0.1;
connection slave;

View File

@@ -36,9 +36,9 @@ set global gtid_strict_mode=1;
--disable_warnings
--disable_query_log
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--replace_result $SERVER_MYPORT_2 MYPORT_2
eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--enable_query_log
--enable_warnings

View File

@@ -35,9 +35,9 @@ set global gtid_strict_mode=1;
--disable_warnings
--disable_query_log
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--replace_result $SERVER_MYPORT_2 MYPORT_2
eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root', master_ssl_verify_server_cert=0, master_use_gtid=slave_pos;
--enable_query_log
--enable_warnings

View File

@@ -71,9 +71,9 @@ SET GLOBAL gtid_strict_mode=1;
--disable_warnings
--disable_query_log
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval CHANGE MASTER 'm1' TO MASTER_PORT=$SERVER_MYPORT_1, MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_USE_GTID=slave_pos;
eval CHANGE MASTER 'm1' TO MASTER_PORT=$SERVER_MYPORT_1, MASTER_HOST='127.0.0.1', MASTER_USER='root', master_ssl_verify_server_cert=0, MASTER_USE_GTID=slave_pos;
--replace_result $SERVER_MYPORT_2 MYPORT_2
eval CHANGE MASTER 'm2' TO MASTER_PORT=$SERVER_MYPORT_2, MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_USE_GTID=slave_pos;
eval CHANGE MASTER 'm2' TO MASTER_PORT=$SERVER_MYPORT_2, MASTER_HOST='127.0.0.1', MASTER_USER='root', master_ssl_verify_server_cert=0, MASTER_USE_GTID=slave_pos;
--enable_query_log
--enable_warnings

View File

@@ -6,8 +6,8 @@
#
--source include/have_log_bin.inc
--source include/have_innodb.inc
--source include/master-slave.inc
--source include/have_debug.inc
--source include/master-slave.inc
--connection slave
SET @old_debug_slave= @@global.debug_dbug;
@@ -112,10 +112,10 @@ SET GLOBAL debug_dbug= @old_debug_master;
set DEBUG_SYNC= 'RESET';
--sync_slave_with_master
stop slave;
--source include/stop_slave.inc
--eval set global slave_parallel_threads = $slave_parallel_threads;
--eval set global slave_parallel_mode = $slave_parallel_mode;
--eval set global gtid_strict_mode = $gtid_strict_mode;
set DEBUG_SYNC= 'RESET';
start slave;
--source include/start_slave.inc
--source include/rpl_end.inc

View File

@@ -155,7 +155,7 @@ INSERT INTO t1 VALUES (6);
--connection slave
# Fix the port after we replaced master.info.
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1;
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, MASTER_SSL=1;
--source include/start_slave.inc
--source include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;

View File

@@ -19,7 +19,7 @@ call mtr.add_suppression("Master is configured to log replication events");
# aborted by the master due to conflicting server_id from multiple connections.
--let $rpl_allow_error= 1
--source include/wait_for_slave_to_stop.inc
start slave;
--source include/start_slave.inc
--connection master
--source include/rpl_end.inc