diff options
author | Luis Soares <luis.soares@oracle.com> | 2011-11-24 17:15:58 +0000 |
---|---|---|
committer | Luis Soares <luis.soares@oracle.com> | 2011-11-24 17:15:58 +0000 |
commit | 67791697e4303355260fa97f5e4493b20e55c49b (patch) | |
tree | cb27960c54625082046a6586e57fccdf377a60b8 /sql/mysqld.cc | |
parent | 2dd10f632b3ec1fa9c4e46785a7cb9a26b2c13b8 (diff) | |
download | mariadb-git-67791697e4303355260fa97f5e4493b20e55c49b.tar.gz |
BUG#11745230: 12133: MASTER.INDEX FILE KEEPS MYSQLD FROM STARTING IF
BIN LOG HAS BEEN MOVED
When moving the binary/relay log files from one location to
another and restarting the server with a different log-bin or
relay-log paths, would cause the startup process to abort. The
root cause was that the server would not be able to find the log
files because it would consider old paths for entries in the
index file instead of the new location. What's even worse, the
relative paths would not be considered relative to the path
provided in log-bin and relay-log, but to mysql_data_dir.
We fix the cases where the server contains relative paths. When
the server is reading from the index file, it checks whether the
entry contains relative paths. If it does, we replace it with the
absolute path set in log-bin/relay-log option. Absolute paths
remain unchanged and the index must be manually edited to
consider the new log-bin and/or relay-log path (this should be
documented). This is a fix for a GA version, that does not break
behavior (that much).
For development versions, we should go with Zhenxing's approach
that removes paths altogether from index files.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 0f5087c6ccf..285b10154ce 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -652,7 +652,7 @@ ulong master_retry_count=0; char *master_info_file; char *relay_log_info_file, *report_user, *report_password, *report_host; char *opt_relay_logname = 0, *opt_relaylog_index_name=0; -char *opt_logname, *opt_slow_logname; +char *opt_logname, *opt_slow_logname, *opt_bin_logname; /* Static variables */ @@ -677,7 +677,6 @@ static char **defaults_argv; static int remaining_argc; /** Remaining command line arguments (arguments), filtered by handle_options().*/ static char **remaining_argv; -static char *opt_bin_logname; int orig_argc; char **orig_argv; |