List:Commits« Previous MessageNext Message »
From:msvensson Date:March 29 2007 1:29pm
Subject:bk commit into 5.1 tree (msvensson:1.2516)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-03-29 15:29:26+02:00, msvensson@stripped +10 -0
  Merge pilot.blaudden:/home/msvensson/mysql/bug19991/my51-bug19991
  into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
  MERGE: 1.2409.101.1

  mysql-test/r/rpl_replicate_do.result@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.37.1.1

  mysql-test/r/rpl_slave_status.result@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.8.1.1

  mysql-test/r/rpl_stm_log.result@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.73.1.1

  mysql-test/t/rpl_ssl1.test@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.23.1.2

  mysql-test/t/rpl_ssl1.test@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Merge rename: mysql-test/t/rpl_openssl.test -> mysql-test/t/rpl_ssl1.test

  sql/lex.h@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.169.1.1

  sql/repl_failsafe.cc@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.72.1.1

  sql/slave.cc@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.304.1.4

  sql/sql_lex.h@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.260.3.1

  sql/sql_repl.cc@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.160.1.1

  sql/sql_yacc.yy@stripped, 2007-03-29 15:29:23+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.534.4.1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	pilot.blaudden
# Root:	/home/msvensson/mysql/mysql-5.1-maint/RESYNC

--- 1.171/sql/lex.h	2007-03-14 22:35:57 +01:00
+++ 1.172/sql/lex.h	2007-03-29 15:29:23 +02:00
@@ -312,6 +312,7 @@ static SYMBOL symbols[] = {
   { "MASTER_SSL_CERT",  SYM(MASTER_SSL_CERT_SYM)},
   { "MASTER_SSL_CIPHER",SYM(MASTER_SSL_CIPHER_SYM)},
   { "MASTER_SSL_KEY",   SYM(MASTER_SSL_KEY_SYM)},
+  { "MASTER_SSL_VERIFY_SERVER_CERT", SYM(MASTER_SSL_VERIFY_SERVER_CERT_SYM)},
   { "MASTER_USER",           SYM(MASTER_USER_SYM)},
   { "MATCH",		SYM(MATCH)},
   { "MAX_CONNECTIONS_PER_HOUR", SYM(MAX_CONNECTIONS_PER_HOUR)},

--- 1.311/sql/slave.cc	2007-03-20 19:18:36 +01:00
+++ 1.312/sql/slave.cc	2007-03-29 15:29:23 +02:00
@@ -1252,6 +1252,8 @@ bool show_master_info(THD* thd, MASTER_I
                                              sizeof(mi->ssl_key)));
   field_list.push_back(new Item_return_int("Seconds_Behind_Master", 10,
                                            MYSQL_TYPE_LONGLONG));
+  field_list.push_back(new Item_empty_string("Master_SSL_Verify_Server_Cert",
+                                             3));
 
   if (protocol->send_fields(&field_list,
                             Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
@@ -1358,7 +1360,10 @@ bool show_master_info(THD* thd, MASTER_I
                                  max(0, time_diff) : 0));
     }
     else
+    {
       protocol->store_null();
+    }
+    protocol->store(mi->ssl_verify_server_cert? "Yes":"No", &my_charset_bin);
 
     pthread_mutex_unlock(&mi->rli.data_lock);
     pthread_mutex_unlock(&mi->data_lock);
@@ -3099,12 +3104,16 @@ static int connect_to_master(THD* thd, M
 
 #ifdef HAVE_OPENSSL
   if (mi->ssl)
+  {
     mysql_ssl_set(mysql,
                   mi->ssl_key[0]?mi->ssl_key:0,
                   mi->ssl_cert[0]?mi->ssl_cert:0,
                   mi->ssl_ca[0]?mi->ssl_ca:0,
                   mi->ssl_capath[0]?mi->ssl_capath:0,
                   mi->ssl_cipher[0]?mi->ssl_cipher:0);
+    mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
+                  &mi->ssl_verify_server_cert);
+  }
 #endif
 
   mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname);

--- 1.269/sql/sql_lex.h	2007-03-19 22:37:33 +01:00
+++ 1.270/sql/sql_lex.h	2007-03-29 15:29:23 +02:00
@@ -188,12 +188,12 @@ typedef struct st_lex_master_info
   uint port, connect_retry;
   ulonglong pos;
   ulong server_id;
-  /* 
-     Variable for MASTER_SSL option.
-     MASTER_SSL=0 in CHANGE MASTER TO corresponds to SSL_DISABLE
-     MASTER_SSL=1 corresponds to SSL_ENABLE
-  */
-  enum {SSL_UNCHANGED=0, SSL_DISABLE, SSL_ENABLE} ssl; 
+  /*
+    Enum is used for making it possible to detect if the user
+    changed variable or if it should be left at old value
+   */
+  enum {SSL_UNCHANGED, SSL_DISABLE, SSL_ENABLE}
+    ssl, ssl_verify_server_cert;
   char *ssl_key, *ssl_cert, *ssl_ca, *ssl_capath, *ssl_cipher;
   char *relay_log_name;
   ulong relay_log_pos;

--- 1.556/sql/sql_yacc.yy	2007-03-29 14:22:49 +02:00
+++ 1.557/sql/sql_yacc.yy	2007-03-29 15:29:23 +02:00
@@ -780,6 +780,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
 %token  MASTER_SSL_CIPHER_SYM
 %token  MASTER_SSL_KEY_SYM
 %token  MASTER_SSL_SYM
+%token  MASTER_SSL_VERIFY_SERVER_CERT_SYM
 %token  MASTER_SYM
 %token  MASTER_USER_SYM
 %token  MATCH                         /* SQL-2003-R */
@@ -1528,6 +1529,11 @@ master_def:
          {
            Lex->mi.ssl_key= $3.str;
 	 }
+       | MASTER_SSL_VERIFY_SERVER_CERT_SYM EQ ulong_num
+         {
+           Lex->mi.ssl_verify_server_cert= $3 ?
+               LEX_MASTER_INFO::SSL_ENABLE : LEX_MASTER_INFO::SSL_DISABLE;
+         }
        |
          master_file_def
        ;

--- 1.24/mysql-test/t/rpl_openssl.test	2007-03-05 10:27:52 +01:00
+++ 1.26/mysql-test/t/rpl_ssl1.test	2007-03-29 15:29:23 +02:00
@@ -46,7 +46,7 @@ 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;
+query_vertical show slave status;
 
 #checking if replication works without ssl also performing clean up
 stop slave;
@@ -60,6 +60,6 @@ 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;
+query_vertical show slave status;
 
 # End of 4.1 tests

--- 1.9/mysql-test/r/rpl_slave_status.result	2007-03-01 14:16:36 +01:00
+++ 1.10/mysql-test/r/rpl_slave_status.result	2007-03-29 15:29:23 +02:00
@@ -52,6 +52,7 @@ Master_SSL_Cert	
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	NULL
+Master_SSL_Verify_Server_Cert	No
 drop table t1;
 delete from mysql.user where user='rpl';
 drop table t1;

--- 1.38/mysql-test/r/rpl_replicate_do.result	2007-03-01 15:24:01 +01:00
+++ 1.39/mysql-test/r/rpl_replicate_do.result	2007-03-29 15:29:23 +02:00
@@ -27,8 +27,8 @@ select * from t11;
 ERROR 42S02: Table 'test.t11' doesn't exist
 drop table if exists t1,t2,t11;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	#	#	#	master-bin.000001	Yes	Yes			test.t1	#			0		0	#	#	None		0	No						#
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	#	#	#	master-bin.000001	Yes	Yes			test.t1	#			0		0	#	#	None		0	No						#	No
 create table t1 (ts timestamp);
 set one_shot time_zone='met';
 insert into t1 values('2005-08-12 00:00:00');

--- 1.74/mysql-test/r/rpl_stm_log.result	2007-03-01 15:25:40 +01:00
+++ 1.75/mysql-test/r/rpl_stm_log.result	2007-03-29 15:29:23 +02:00
@@ -91,8 +91,8 @@ slave-bin.000002	#	Format_desc	2	#	Serve
 slave-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=MyISAM
 slave-bin.000002	#	Query	1	#	use `test`; insert into t2 values (1)
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	388	#	#	master-bin.000002	Yes	Yes				#			0		0	388	#	None		0	No						#
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	388	#	#	master-bin.000002	Yes	Yes				#			0		0	388	#	None		0	No						#	No
 show binlog events in 'slave-bin.000005' from 4;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
 DROP TABLE t1;

--- 1.74/sql/repl_failsafe.cc	2007-02-23 12:23:40 +01:00
+++ 1.75/sql/repl_failsafe.cc	2007-03-29 15:29:23 +02:00
@@ -692,12 +692,16 @@ int connect_to_master(THD *thd, MYSQL* m
 
 #ifdef HAVE_OPENSSL
   if (mi->ssl)
+  {
     mysql_ssl_set(mysql, 
         mi->ssl_key[0]?mi->ssl_key:0,
         mi->ssl_cert[0]?mi->ssl_cert:0,
         mi->ssl_ca[0]?mi->ssl_ca:0, 
         mi->ssl_capath[0]?mi->ssl_capath:0,
         mi->ssl_cipher[0]?mi->ssl_cipher:0);
+    mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
+                  &mi->ssl_verify_server_cert);
+  }
 #endif
     
   mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname);

--- 1.164/sql/sql_repl.cc	2007-03-06 16:55:06 +01:00
+++ 1.165/sql/sql_repl.cc	2007-03-29 15:29:23 +02:00
@@ -1130,6 +1130,11 @@ bool change_master(THD* thd, MASTER_INFO
 
   if (lex_mi->ssl != LEX_MASTER_INFO::SSL_UNCHANGED)
     mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::SSL_ENABLE);
+
+  if (lex_mi->ssl_verify_server_cert != LEX_MASTER_INFO::SSL_UNCHANGED)
+    mi->ssl_verify_server_cert=
+      (lex_mi->ssl_verify_server_cert == LEX_MASTER_INFO::SSL_ENABLE);
+
   if (lex_mi->ssl_ca)
     strmake(mi->ssl_ca, lex_mi->ssl_ca, sizeof(mi->ssl_ca)-1);
   if (lex_mi->ssl_capath)
@@ -1142,7 +1147,8 @@ bool change_master(THD* thd, MASTER_INFO
     strmake(mi->ssl_key, lex_mi->ssl_key, sizeof(mi->ssl_key)-1);
 #ifndef HAVE_OPENSSL
   if (lex_mi->ssl || lex_mi->ssl_ca || lex_mi->ssl_capath ||
-      lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key )
+      lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key ||
+      lex_mi->ssl_verify_server_cert )
     push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
                  ER_SLAVE_IGNORED_SSL_PARAMS, ER(ER_SLAVE_IGNORED_SSL_PARAMS));
 #endif
Thread
bk commit into 5.1 tree (msvensson:1.2516)msvensson29 Mar