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
81b2d8ac
Commit
81b2d8ac
authored
Sep 04, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
81f9676d
0b65cbaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
sql/log.cc
sql/log.cc
+7
-2
sql/log.h
sql/log.h
+1
-0
sql/sql_repl.cc
sql/sql_repl.cc
+6
-2
No files found.
sql/log.cc
View file @
81b2d8ac
...
...
@@ -2261,13 +2261,18 @@ shutdown the MySQL server and restart it.", name, errno);
int
MYSQL_BIN_LOG
::
get_current_log
(
LOG_INFO
*
linfo
)
{
pthread_mutex_lock
(
&
LOCK_log
);
int
ret
=
raw_get_current_log
(
linfo
);
pthread_mutex_unlock
(
&
LOCK_log
);
return
ret
;
}
int
MYSQL_BIN_LOG
::
raw_get_current_log
(
LOG_INFO
*
linfo
)
{
strmake
(
linfo
->
log_file_name
,
log_file_name
,
sizeof
(
linfo
->
log_file_name
)
-
1
);
linfo
->
pos
=
my_b_tell
(
&
log_file
);
pthread_mutex_unlock
(
&
LOCK_log
);
return
0
;
}
/*
Move all data up in a file in an filename index file
...
...
sql/log.h
View file @
81b2d8ac
...
...
@@ -367,6 +367,7 @@ public:
bool
need_mutex
);
int
find_next_log
(
LOG_INFO
*
linfo
,
bool
need_mutex
);
int
get_current_log
(
LOG_INFO
*
linfo
);
int
raw_get_current_log
(
LOG_INFO
*
linfo
);
uint
next_file_id
();
inline
char
*
get_index_fname
()
{
return
index_file_name
;}
inline
char
*
get_log_fname
()
{
return
log_file_name
;
}
...
...
sql/sql_repl.cc
View file @
81b2d8ac
...
...
@@ -1506,10 +1506,14 @@ bool show_binlogs(THD* thd)
if
(
protocol
->
send_fields
(
&
field_list
,
Protocol
::
SEND_NUM_ROWS
|
Protocol
::
SEND_EOF
))
DBUG_RETURN
(
TRUE
);
pthread_mutex_lock
(
mysql_bin_log
.
get_log_lock
());
mysql_bin_log
.
lock_index
();
index_file
=
mysql_bin_log
.
get_index_file
();
mysql_bin_log
.
get_current_log
(
&
cur
);
mysql_bin_log
.
raw_get_current_log
(
&
cur
);
// dont take mutex
pthread_mutex_unlock
(
mysql_bin_log
.
get_log_lock
());
// lockdep, OK
cur_dir_len
=
dirname_length
(
cur
.
log_file_name
);
reinit_io_cache
(
index_file
,
READ_CACHE
,
(
my_off_t
)
0
,
0
,
0
);
...
...
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