diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2010-03-05 14:08:21 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2010-03-05 14:08:21 +0100 |
commit | 39e30ed9e0c8b4fbb44a372a5a8014427176ad5f (patch) | |
tree | bea9045dc83fdcd27b60b2ef9098d9118d767b08 /sql/mysqld.cc | |
parent | dad94c24afc8f099b40d94eae89c5313aa406255 (diff) | |
download | mariadb-git-39e30ed9e0c8b4fbb44a372a5a8014427176ad5f.tar.gz |
Fix for BUG#51215 "log-error partially works with version 5.5": WL 4738 (reengineering of server variables)
had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing
to a file with an autogenerated name.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 2e908eb3366..37713992a90 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3962,6 +3962,11 @@ static int init_server_components() else fn_format(log_error_file, log_error_file_ptr, mysql_data_home, ".err", MY_UNPACK_FILENAME | MY_SAFE_PATH); + /* + _ptr may have been set to my_disabled_option or "" if no argument was + passed, but we need to show the real name in SHOW VARIABLES: + */ + log_error_file_ptr= log_error_file; if (!log_error_file[0]) opt_error_log= 0; // Too long file name else @@ -7357,6 +7362,14 @@ mysqld_get_one_option(int optid, global_system_variables.optimizer_switch&= ~OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN; break; + case OPT_LOG_ERROR: + /* + "No --log-error" == "write errors to stderr", + "--log-error without argument" == "write errors to a file". + */ + if (argument == NULL) /* no argument */ + log_error_file_ptr= const_cast<char*>(""); + break; } return 0; } |