From 77fcf72cf42f651bf87e3b6300d6d0ccd48b8e9c Mon Sep 17 00:00:00 2001 From: "Norvald H. Ryeng" Date: Wed, 23 May 2012 12:27:32 +0200 Subject: [PATCH] WL#6311 Remove --safe-mode Print deprecation warning if the --safe-mode command line option is used. --- mysql-test/r/mysqld--help-notwin.result | 2 +- mysql-test/r/mysqld--help-win.result | 2 +- sql/mysqld.cc | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index 36649cf761d..72f89ae3bc1 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -595,7 +595,7 @@ The following options may be given as the first argument: master during slave registration --rpl-recovery-rank=# Unused, will be removed - --safe-mode Skip some optimize stages (for testing). + --safe-mode Skip some optimize stages (for testing). Deprecated. --safe-user-create Don't allow new user creation by the user who has no write privileges to the mysql.user table. --secure-auth Disallow authentication for accounts that have old diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result index db7dd264b76..2ab41913427 100644 --- a/mysql-test/r/mysqld--help-win.result +++ b/mysql-test/r/mysqld--help-win.result @@ -595,7 +595,7 @@ The following options may be given as the first argument: master during slave registration --rpl-recovery-rank=# Unused, will be removed - --safe-mode Skip some optimize stages (for testing). + --safe-mode Skip some optimize stages (for testing). Deprecated. --safe-user-create Don't allow new user creation by the user who has no write privileges to the mysql.user table. --secure-auth Disallow authentication for accounts that have old diff --git a/sql/mysqld.cc b/sql/mysqld.cc index a37a9701fe7..df9fbaa8652 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5948,7 +5948,7 @@ struct my_option my_long_options[]= "will not do updates to tables in databases that start with foo and whose " "table names start with bar.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"safe-mode", OPT_SAFE, "Skip some optimize stages (for testing).", + {"safe-mode", OPT_SAFE, "Skip some optimize stages (for testing). Deprecated.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"safe-user-create", 0, "Don't allow new user creation by the user who has no write privileges to the mysql.user table.", @@ -7081,6 +7081,8 @@ mysqld_get_one_option(int optid, delay_key_write_options= DELAY_KEY_WRITE_NONE; myisam_recover_options= HA_RECOVER_DEFAULT; ha_open_options&= ~(HA_OPEN_DELAY_KEY_WRITE); + sql_print_warning("The syntax '--safe-mode' is deprecated and will be " + "removed in a future release."); break; case (int) OPT_SKIP_PRIOR: opt_specialflag|= SPECIAL_NO_PRIOR;