Commit 27392467 authored by msvensson@pilot.blaudden's avatar msvensson@pilot.blaudden

Merge bk-internal:/home/bk/mysql-5.1-new-maint

into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
parents 03034292 cd004eb7
-- require r/have_openssl.require
-- require r/have_ssl.require
disable_query_log;
show variables like "have_openssl";
show variables like "have_ssl";
enable_query_log;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
grant replication slave on *.* to replssl@localhost require ssl;
create table t1 (t int auto_increment, KEY(t));
stop slave;
change master to
master_user='replssl',
master_password='',
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;
insert into t1 values(1);
select * from t1;
t
1
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User replssl
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 420
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 420
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed Yes
Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master #
STOP SLAVE;
select * from t1;
t
1
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User replssl
Master_Port MASTER_MYPORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 12320
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 12320
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed Yes
Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
Seconds_Behind_Master #
This diff is collapsed.
-- source include/have_openssl.inc
-- source include/have_ssl.inc
# This test can't be in func_encrypt.test, because it requires
# --des-key-file to not be set.
......
-- source include/have_openssl.inc
-- source include/have_ssl.inc
--disable_warnings
drop table if exists t1;
......
# We test openssl. Result set is optimized to be compiled with --with-openssl.
# Use mysql-test-run with --with-openssl option.
-- source include/have_openssl.inc
# Tests for SSL connections, only run if mysqld is compiled
# with support for SSL.
-- source include/have_ssl.inc
--disable_warnings
drop table if exists t1;
......
source include/have_openssl.inc;
source include/have_ssl.inc;
source include/master-slave.inc;
# We don't test all types of ssl auth params here since it's a bit hard
......
source include/have_ssl.inc;
source include/master-slave.inc;
# create a user for replication that requires ssl encryption
connection master;
grant replication slave on *.* to replssl@localhost require ssl;
create table t1 (t int auto_increment, KEY(t));
sync_slave_with_master;
# Set slave to use SSL for connection to master
stop slave;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval change master to
master_user='replssl',
master_password='',
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;
# Switch to master and insert one record, then sync it to slave
connection master;
insert into t1 values(1);
sync_slave_with_master;
# The record should now be on slave
select * from t1;
# The slave is synced and waiting/reading from master
# SHOW SLAVE STATUS will show "Waiting for master to send event"
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 8 # 9 # 23 # 33 #
query_vertical show slave status;
# Stop the slave, as reported in bug#21871 it would hang
STOP SLAVE;
select * from t1;
# Do the same thing a number of times
disable_query_log;
let $i= 100;
while ($i)
{
start slave;
connection master;
insert into t1 values (NULL);
connection slave;
stop slave;
dec $i;
}
start slave;
enable_query_log;
connection master;
sync_slave_with_master;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 8 # 9 # 23 # 33 #
query_vertical show slave status;
# Turn on ssl between the client and server
# and run a number of tests
-- source include/have_openssl.inc
-- source include/have_ssl.inc
connect (ssl_con,localhost,root,,,,,SSL);
......
# Turn on compression between the client and server
# and run a number of tests
-- source include/have_openssl.inc
-- source include/have_ssl.inc
-- source include/have_compress.inc
connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS);
......
-- source include/have_openssl.inc
-- source include/have_ssl.inc
# Repeat connect/disconnect
......
# Tell the server to use a DES-encrypted cert
# then turn on ssl between the client and server
# and run a number of standard tests
-- source include/have_openssl.inc
# Connect by ip to avoid turning on "ssl-verify-server-cert"
connect (ssl_con,127.0.0.1,root,,,,$MASTER_MYPORT,SSL);
# Check ssl turned on
SHOW STATUS LIKE 'Ssl_cipher';
# Source select test case
-- source include/common-tests.inc
# Check ssl turned on
SHOW STATUS LIKE 'Ssl_cipher';
......@@ -1705,7 +1705,7 @@ extern handlerton *partition_hton;
extern handlerton *myisam_hton;
extern handlerton *heap_hton;
extern SHOW_COMP_OPTION have_openssl, have_symlink, have_dlopen;
extern SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen;
extern SHOW_COMP_OPTION have_query_cache;
extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;
extern SHOW_COMP_OPTION have_crypt;
......
......@@ -571,7 +571,7 @@ CHARSET_INFO *system_charset_info, *files_charset_info ;
CHARSET_INFO *national_charset_info, *table_alias_charset;
CHARSET_INFO *character_set_filesystem;
SHOW_COMP_OPTION have_openssl, have_symlink, have_dlopen, have_query_cache;
SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen, have_query_cache;
SHOW_COMP_OPTION have_geometry, have_rtree_keys;
SHOW_COMP_OPTION have_crypt, have_compress;
......@@ -3159,12 +3159,12 @@ static void init_ssl()
if (!ssl_acceptor_fd)
{
opt_use_ssl = 0;
have_openssl= SHOW_OPTION_DISABLED;
have_ssl= SHOW_OPTION_DISABLED;
}
}
else
{
have_openssl= SHOW_OPTION_DISABLED;
have_ssl= SHOW_OPTION_DISABLED;
}
if (des_key_file)
load_des_key_file(des_key_file);
......@@ -7257,9 +7257,9 @@ static void mysql_init_variables(void)
have_ndbcluster=SHOW_OPTION_NO;
#endif
#ifdef HAVE_OPENSSL
have_openssl=SHOW_OPTION_YES;
have_ssl=SHOW_OPTION_YES;
#else
have_openssl=SHOW_OPTION_NO;
have_ssl=SHOW_OPTION_NO;
#endif
#ifdef HAVE_BROKEN_REALPATH
have_symlink=SHOW_OPTION_NO;
......
......@@ -675,7 +675,8 @@ sys_var_have_variable sys_have_dlopen("have_dynamic_loading", &have_dlopen);
sys_var_have_variable sys_have_geometry("have_geometry", &have_geometry);
sys_var_have_variable sys_have_innodb("have_innodb", &have_innodb);
sys_var_have_variable sys_have_ndbcluster("have_ndbcluster", &have_ndbcluster);
sys_var_have_variable sys_have_openssl("have_openssl", &have_openssl);
sys_var_have_variable sys_have_openssl("have_openssl", &have_ssl);
sys_var_have_variable sys_have_ssl("have_ssl", &have_ssl);
sys_var_have_variable sys_have_partition_db("have_partitioning",
&have_partition_db);
sys_var_have_variable sys_have_query_cache("have_query_cache",
......@@ -800,7 +801,8 @@ SHOW_VAR init_vars[]= {
{sys_have_geometry.name, (char*) &have_geometry, SHOW_HAVE},
{sys_have_innodb.name, (char*) &have_innodb, SHOW_HAVE},
{sys_have_ndbcluster.name, (char*) &have_ndbcluster, SHOW_HAVE},
{sys_have_openssl.name, (char*) &have_openssl, SHOW_HAVE},
{sys_have_openssl.name, (char*) &have_ssl, SHOW_HAVE},
{sys_have_ssl.name, (char*) &have_ssl, SHOW_HAVE},
{sys_have_partition_db.name,(char*) &have_partition_db, SHOW_HAVE},
{sys_have_query_cache.name, (char*) &have_query_cache, SHOW_HAVE},
{sys_have_rtree_keys.name, (char*) &have_rtree_keys, SHOW_HAVE},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment