List:Commits« Previous MessageNext Message »
From:cbell Date:November 22 2006 10:29pm
Subject:bk commit into 5.1 tree (cbell:1.2373) BUG#21490
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of Chuck. When Chuck 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, 2006-11-22 17:29:44-05:00, cbell@mysql_cab. +1 -0
  BUG#21490 - CHANGE MASTER to MASTER HOST is lost on RESET SLAVE
  This fix deprecates the CHANGE MASTER command options in the
  configuration file and those included on the command line.

  sql/mysqld.cc@stripped, 2006-11-22 17:28:44-05:00, cbell@mysql_cab. +31 -0
    BUG#21490 - CHANGE MASTER to MASTER HOST is lost on RESET SLAVE
    This fix deprecates the CHANGE MASTER command options in the
    configuration file and those included on the command line.
    The options deprecated include:
    MASTER_HOST, MASTER_USER, MASTER_PASSWORD, MASTER_PORT,
    MASTER_CONNECT_RETRY, MASTER_SSL, MASTER_SSL_CA,
    MASTER_SSL_CAPATH, MASTER_SSL_CERT, MASTER_SSL_KEY,
    MASTER_SSL_CIPHER

# 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:	cbell
# Host:	mysql_cab.
# Root:	C:/source/c++/mysql-5.1_BUG_21490

--- 1.590/sql/mysqld.cc	2006-11-22 17:30:00 -05:00
+++ 1.591/sql/mysqld.cc	2006-11-22 17:30:00 -05:00
@@ -354,6 +354,8 @@
 my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
 my_bool opt_log_slave_updates= 0;
 my_bool	opt_innodb;
+bool slave_warning_issued = false;
+
 
 /*
   Legacy global handlerton. These will be removed (please do not add more).
@@ -7490,6 +7492,35 @@
   case (int) OPT_STANDALONE:		/* Dummy option for NT */
     break;
 #endif
+  /*
+    The following change issues a deprecation warning if the slave
+    configuration is specified either in the my.cnf file or on
+    the command-line. See BUG#21490.
+  */
+  case OPT_MASTER_HOST:
+  case OPT_MASTER_USER:
+  case OPT_MASTER_PASSWORD:
+  case OPT_MASTER_PORT:
+  case OPT_MASTER_CONNECT_RETRY:
+  case OPT_MASTER_SSL:          
+  case OPT_MASTER_SSL_KEY:
+  case OPT_MASTER_SSL_CERT:       
+  case OPT_MASTER_SSL_CAPATH:
+  case OPT_MASTER_SSL_CIPHER:
+  case OPT_MASTER_SSL_CA:
+    if (!slave_warning_issued)                 //only show the warning once
+    {
+	    slave_warning_issued = true;         
+      sql_print_warning("Slave configuration using command-line parameters "
+                        "or the %s file has been deprecated. Please use "
+                        "CHANGE MASTER to setup the slave for replication.\n",
+#if defined (__WIN__) || (_WIN64)
+                        "my.ini");
+#else
+                        "my.cnf");
+#endif
+    }
+    break;
   case OPT_CONSOLE:
     if (opt_console)
       opt_error_log= 0;			// Force logs to stdout


Thread
bk commit into 5.1 tree (cbell:1.2373) BUG#21490cbell22 Nov