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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6b0b25a2
Commit
6b0b25a2
authored
Aug 06, 2019
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup log_type_arg of MYSQL_BIN_LOG::open()
It is always LOG_BIN anyway.
parent
e976d956
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
11 deletions
+7
-11
sql/log.cc
sql/log.cc
+4
-7
sql/log.h
sql/log.h
+0
-1
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/rpl_rli.cc
sql/rpl_rli.cc
+2
-2
No files found.
sql/log.cc
View file @
6b0b25a2
...
...
@@ -3448,7 +3448,6 @@ bool MYSQL_BIN_LOG::open_index_file(const char *index_file_name_arg,
*/
bool
MYSQL_BIN_LOG
::
open
(
const
char
*
log_name
,
enum_log_type
log_type_arg
,
const
char
*
new_name
,
ulong
next_log_number
,
enum
cache_type
io_cache_type_arg
,
...
...
@@ -3459,7 +3458,6 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
File
file
=
-
1
;
xid_count_per_binlog
*
new_xid_list_entry
=
NULL
,
*
b
;
DBUG_ENTER
(
"MYSQL_BIN_LOG::open"
);
DBUG_PRINT
(
"enter"
,(
"log_type: %d"
,(
int
)
log_type_arg
));
mysql_mutex_assert_owner
(
&
LOCK_log
);
...
...
@@ -3479,7 +3477,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
/* We need to calculate new log file name for purge to delete old */
if
(
init_and_set_log_file_name
(
log_name
,
new_name
,
next_log_number
,
log_type_arg
,
io_cache_type_arg
))
LOG_BIN
,
io_cache_type_arg
))
{
sql_print_error
(
"MYSQL_BIN_LOG::open failed to generate new file name."
);
DBUG_RETURN
(
1
);
...
...
@@ -4313,7 +4311,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD *thd, bool create_new_log,
}
}
if
(
create_new_log
&&
!
open_index_file
(
index_file_name
,
0
,
FALSE
))
if
(
unlikely
((
error
=
open
(
save_name
,
log_type
,
0
,
next_log_number
,
if
(
unlikely
((
error
=
open
(
save_name
,
0
,
next_log_number
,
io_cache_type
,
max_size
,
0
,
FALSE
))))
goto
err
;
my_free
((
void
*
)
save_name
);
...
...
@@ -5305,8 +5303,7 @@ int MYSQL_BIN_LOG::new_file_impl()
{
/* reopen the binary log file. */
file_to_open
=
new_name_ptr
;
error
=
open
(
old_name
,
log_type
,
new_name_ptr
,
0
,
io_cache_type
,
max_size
,
1
,
FALSE
);
error
=
open
(
old_name
,
new_name_ptr
,
0
,
io_cache_type
,
max_size
,
1
,
FALSE
);
}
/* handle reopening errors */
...
...
@@ -9681,7 +9678,7 @@ int TC_LOG_BINLOG::open(const char *opt_name)
{
mysql_mutex_lock
(
&
LOCK_log
);
/* generate a new binlog to mask a corrupted one */
open
(
opt_name
,
LOG_BIN
,
0
,
0
,
WRITE_CACHE
,
max_binlog_size
,
0
,
TRUE
);
open
(
opt_name
,
0
,
0
,
WRITE_CACHE
,
max_binlog_size
,
0
,
TRUE
);
mysql_mutex_unlock
(
&
LOCK_log
);
cleanup
();
return
1
;
...
...
sql/log.h
View file @
6b0b25a2
...
...
@@ -773,7 +773,6 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
void
init_pthread_objects
();
void
cleanup
();
bool
open
(
const
char
*
log_name
,
enum_log_type
log_type
,
const
char
*
new_name
,
ulong
next_log_number
,
enum
cache_type
io_cache_type_arg
,
...
...
sql/mysqld.cc
View file @
6b0b25a2
...
...
@@ -5278,7 +5278,7 @@ static int init_server_components()
int
error
;
mysql_mutex_t
*
log_lock
=
mysql_bin_log
.
get_log_lock
();
mysql_mutex_lock
(
log_lock
);
error
=
mysql_bin_log
.
open
(
opt_bin_logname
,
LOG_BIN
,
0
,
0
,
error
=
mysql_bin_log
.
open
(
opt_bin_logname
,
0
,
0
,
WRITE_CACHE
,
max_binlog_size
,
0
,
TRUE
);
mysql_mutex_unlock
(
log_lock
);
if
(
unlikely
(
error
))
...
...
sql/rpl_rli.cc
View file @
6b0b25a2
...
...
@@ -237,7 +237,7 @@ a file name for --relay-log-index option", opt_relaylog_index_name);
*/
mysql_mutex_lock
(
log_lock
);
if
(
relay_log
.
open_index_file
(
buf_relaylog_index_name
,
ln
,
TRUE
)
||
relay_log
.
open
(
ln
,
LOG_BIN
,
0
,
0
,
SEQ_READ_APPEND
,
relay_log
.
open
(
ln
,
0
,
0
,
SEQ_READ_APPEND
,
(
ulong
)
max_relay_log_size
,
1
,
TRUE
))
{
mysql_mutex_unlock
(
log_lock
);
...
...
@@ -1178,7 +1178,7 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
DBUG_RETURN
(
1
);
}
mysql_mutex_lock
(
rli
->
relay_log
.
get_log_lock
());
if
(
rli
->
relay_log
.
open
(
ln
,
LOG_BIN
,
0
,
0
,
SEQ_READ_APPEND
,
if
(
rli
->
relay_log
.
open
(
ln
,
0
,
0
,
SEQ_READ_APPEND
,
(
ulong
)(
rli
->
max_relay_log_size
?
rli
->
max_relay_log_size
:
max_binlog_size
),
1
,
TRUE
))
{
...
...
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