Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1cb5d98d
Commit
1cb5d98d
authored
Jan 16, 2005
by
guilhem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When we warn that --log-bin alone is dangerous, we give a suggestion.
parent
c30e6000
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
sql/mysqld.cc
sql/mysqld.cc
+16
-14
sql/sql_class.h
sql/sql_class.h
+1
-0
No files found.
sql/mysqld.cc
View file @
1cb5d98d
...
...
@@ -2687,20 +2687,6 @@ with --log-bin instead.");
if
(
opt_bin_log
)
{
if
(
!
opt_bin_logname
&&
!
opt_binlog_index_name
)
{
/*
User didn't give us info to name the binlog index file.
Picking `hostname`-bin.index like did in 4.x, causes replication to
fail if the hostname is changed later. So, we would like to instead
require a name. But as we don't want to break many existing setups, we
only give warning, not error.
*/
sql_print_warning
(
"\
No argument was provided to --log-bin, and --log-bin-index was not used. "
"Replication may break when this MySQL server acts as a master and has his "
"hostname changed."
);
}
/* If we fail to open binlog, it's going to hinder our recovery, so die */
if
(
open_log
(
&
mysql_bin_log
,
glob_hostname
,
opt_bin_logname
,
"-bin"
,
opt_binlog_index_name
,
LOG_BIN
,
0
,
0
,
max_binlog_size
))
...
...
@@ -2714,6 +2700,22 @@ No argument was provided to --log-bin, and --log-bin-index was not used. "
mysql_bin_log
.
purge_logs_before_date
(
purge_time
);
}
#endif
if
(
!
opt_bin_logname
&&
!
opt_binlog_index_name
)
{
/*
User didn't give us info to name the binlog index file.
Picking `hostname`-bin.index like did in 4.x, causes replication to
fail if the hostname is changed later. So, we would like to instead
require a name. But as we don't want to break many existing setups, we
only give warning, not error.
*/
sql_print_warning
(
"\
No argument was provided to --log-bin, and --log-bin-index was not used; \
so replication may break when this MySQL server acts as a master and \
has his hostname changed!! Please use '--log-bin=%s' to avoid \
this problem."
,
mysql_bin_log
.
get_name
());
}
}
else
{
...
...
sql/sql_class.h
View file @
1cb5d98d
...
...
@@ -205,6 +205,7 @@ public:
inline
bool
is_open
()
{
return
log_type
!=
LOG_CLOSED
;
}
inline
char
*
get_index_fname
()
{
return
index_file_name
;}
inline
char
*
get_log_fname
()
{
return
log_file_name
;
}
inline
char
*
get_name
()
{
return
name
;
}
inline
pthread_mutex_t
*
get_log_lock
()
{
return
&
LOCK_log
;
}
inline
IO_CACHE
*
get_log_file
()
{
return
&
log_file
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment