mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
c3c5f8d6d7
into mysql.com:/home/jimw/my/mysql-5.1-clean BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-mysql_upgrade.dsp: Delete: VC++Files/client/mysql_upgrade.dsp BitKeeper/deleted/.del-mysql_upgrade_ia64.dsp: Delete: VC++Files/client/mysql_upgrade_ia64.dsp BitKeeper/deleted/.del-mysql_upgrade.c: Delete: client/mysql_upgrade.c VC++Files/mysql.dsw: Auto merged VC++Files/mysql.sln: Auto merged VC++Files/mysql_ia64.dsw: Auto merged client/mysql.cc: Auto merged config/ac-macros/zlib.m4: Auto merged configure.in: Auto merged extra/yassl/Makefile.am: Auto merged extra/yassl/taocrypt/Makefile.am: Auto merged include/my_global.h: Auto merged include/mysql.h: Auto merged libmysql/libmysql.def: Auto merged libmysqld/libmysqld.def: Auto merged mysql-test/r/grant2.result: Auto merged mysql-test/r/sp-security.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/r/udf.result: Auto merged mysql-test/t/grant2.test: Auto merged mysql-test/t/rpl_openssl.test: Auto merged mysql-test/t/rpl_rotate_logs.test: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/t/trigger.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_subselect.cc: Auto merged sql-common/client.c: Auto merged sql/mysqld.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_parse.cc: Auto merged client/Makefile.am: Resolve conflict config/ac-macros/yassl.m4: Resolve conflict mysql-test/include/have_udf.inc: Resolve conflict mysql-test/lib/mtr_process.pl: Resolve conflict mysql-test/mysql-test-run.pl: Resolve conflict mysql-test/r/have_udf.require: Resolve conflict mysql-test/r/rpl_openssl.result: Resolve conflict mysql-test/t/disabled.def: Resolve conflict mysql-test/t/information_schema.test: Resolve conflict server-tools/instance-manager/instance_options.cc: Resolve conflict sql/mysql_priv.h: Resolve conflict sql/set_var.cc: Resolve conflict support-files/mysql.spec.sh: Resolve conflict
65 lines
1.9 KiB
Text
65 lines
1.9 KiB
Text
source include/have_openssl.inc;
|
|
source include/master-slave.inc;
|
|
|
|
# We don't test all types of ssl auth params here since it's a bit hard
|
|
# until problems with OpenSSL 0.9.7 are unresolved
|
|
|
|
# creating replication user for whom ssl auth is required
|
|
# preparing playground
|
|
connection master;
|
|
grant replication slave on *.* to replssl@localhost require ssl;
|
|
create table t1 (t int);
|
|
save_master_pos;
|
|
|
|
#syncing with master
|
|
connection slave;
|
|
sync_with_master;
|
|
|
|
#trying to use this user without ssl
|
|
stop slave;
|
|
change master to master_user='replssl',master_password='';
|
|
start slave;
|
|
|
|
#showing that replication don't work
|
|
connection master;
|
|
insert into t1 values (1);
|
|
#reasonable timeout for changes to propagate to slave
|
|
sleep 3;
|
|
connection slave;
|
|
select * from t1;
|
|
|
|
#showing that replication could work with ssl params
|
|
stop slave;
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
|
|
start slave;
|
|
|
|
#avoiding unneeded sleeps
|
|
connection master;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
|
|
#checking that replication is ok
|
|
select * from t1;
|
|
|
|
#checking show slave status
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
|
|
--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
|
|
show slave status;
|
|
|
|
#checking if replication works without ssl also performing clean up
|
|
stop slave;
|
|
change master to master_user='root',master_password='', master_ssl=0;
|
|
start slave;
|
|
connection master;
|
|
drop user replssl@localhost;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
|
|
--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 #
|
|
show slave status;
|
|
|
|
# End of 4.1 tests
|