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
7b54dec1
Commit
7b54dec1
authored
Aug 31, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: comments
parent
89e08bf3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
35 deletions
+13
-35
sql/log.cc
sql/log.cc
+1
-1
sql/log_event.cc
sql/log_event.cc
+8
-30
sql/log_event.h
sql/log_event.h
+3
-3
sql/rpl_rli.cc
sql/rpl_rli.cc
+1
-1
No files found.
sql/log.cc
View file @
7b54dec1
...
...
@@ -5956,7 +5956,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
/*
When binary logging is not enabled (--log-bin=0), wsrep-patch partially
enables it without opening the binlog file (MSQL_BIN_LOG::open().
enables it without opening the binlog file (M
Y
SQL_BIN_LOG::open().
So, avoid writing to binlog file.
*/
if
(
direct
&&
...
...
sql/log_event.cc
View file @
7b54dec1
...
...
@@ -1157,8 +1157,7 @@ bool Log_event::write_footer(IO_CACHE* file)
{
DBUG_ENTER
(
"write_footer"
);
/*
footer contains the checksum-algorithm descriptor
followed by the checksum value
(optional) footer contains the checksum value
*/
if
(
need_checksum
())
{
...
...
@@ -1171,7 +1170,7 @@ bool Log_event::write_footer(IO_CACHE* file)
}
/*
Log_event::write()
Log_event::write
_header
()
*/
bool
Log_event
::
write_header
(
IO_CACHE
*
file
,
ulong
event_data_length
)
...
...
@@ -1209,29 +1208,8 @@ bool Log_event::write_header(IO_CACHE* file, ulong event_data_length)
else
if
(
!
log_pos
)
{
/*
Calculate position of end of event
Note that with a SEQ_READ_APPEND cache, my_b_tell() does not
work well. So this will give slightly wrong positions for the
Format_desc/Rotate/Stop events which the slave writes to its
relay log. For example, the initial Format_desc will have
end_log_pos=91 instead of 95. Because after writing the first 4
bytes of the relay log, my_b_tell() still reports 0. Because
my_b_append() does not update the counter which my_b_tell()
later uses (one should probably use my_b_append_tell() to work
around this). To get right positions even when writing to the
relay log, we use the (new) my_b_safe_tell().
Note that this raises a question on the correctness of all these
DBUG_ASSERT(my_b_tell()=rli->event_relay_log_pos).
If in a transaction, the log_pos which we calculate below is not
very good (because then my_b_safe_tell() returns start position
of the BEGIN, so it's like the statement was at the BEGIN's
place), but it's not a very serious problem (as the slave, when
it is in a transaction, does not take those end_log_pos into
account (as it calls inc_event_relay_log_pos()). To be fixed
later, so that it looks less strange. But not bug.
Calculate the position of where the next event will start
(end of this event, that is).
*/
log_pos
=
my_b_safe_tell
(
file
)
+
data_written
;
...
...
@@ -1341,7 +1319,7 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet,
file->error will have been set to number of bytes left to read
2. Read was interrupted, file->error would normally be set to -1
3. Failed to allocate memory for packet, my_errno
will be ENOMEM(file->error sh
uo
ld be 0, but since the
will be ENOMEM(file->error sh
ou
ld be 0, but since the
memory allocation occurs before the call to read it might
be uninitialized)
*/
...
...
@@ -2737,7 +2715,7 @@ void Query_log_event::pack_info(THD *thd, Protocol *protocol)
/**
Utility function for the next method (Query_log_event::write()) .
*/
static
void
writ
e_str_with_code_and_len
(
uchar
**
dst
,
const
char
*
src
,
static
void
stor
e_str_with_code_and_len
(
uchar
**
dst
,
const
char
*
src
,
uint
len
,
uint
code
)
{
/*
...
...
@@ -2833,7 +2811,7 @@ bool Query_log_event::write(IO_CACHE* file)
}
if
(
catalog_len
)
// i.e. this var is inited (false for 4.0 events)
{
writ
e_str_with_code_and_len
(
&
start
,
stor
e_str_with_code_and_len
(
&
start
,
catalog
,
catalog_len
,
Q_CATALOG_NZ_CODE
);
/*
In 5.0.x where x<4 masters we used to store the end zero here. This was
...
...
@@ -2871,7 +2849,7 @@ bool Query_log_event::write(IO_CACHE* file)
{
/* In the TZ sys table, column Name is of length 64 so this should be ok */
DBUG_ASSERT
(
time_zone_len
<=
MAX_TIME_ZONE_NAME_LENGTH
);
writ
e_str_with_code_and_len
(
&
start
,
stor
e_str_with_code_and_len
(
&
start
,
time_zone_str
,
time_zone_len
,
Q_TIME_ZONE_CODE
);
}
if
(
lc_time_names_number
)
...
...
sql/log_event.h
View file @
7b54dec1
...
...
@@ -1239,10 +1239,12 @@ public:
write_data_body
(
file
)
||
write_footer
(
file
));
}
virtual
bool
write_data_header
(
IO_CACHE
*
file
)
virtual
bool
write_data_header
(
IO_CACHE
*
file
__attribute__
((
unused
))
)
{
return
0
;
}
virtual
bool
write_data_body
(
IO_CACHE
*
file
__attribute__
((
unused
)))
{
return
0
;
}
/* Return start of query time or current time */
inline
my_time_t
get_time
()
{
THD
*
tmp_thd
;
...
...
@@ -1321,8 +1323,6 @@ public:
*/
const
char
*
get_type_str
();
/* Return start of query time or current time */
#if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
public:
...
...
sql/rpl_rli.cc
View file @
7b54dec1
...
...
@@ -1009,7 +1009,7 @@ void Relay_log_info::inc_group_relay_log_pos(ulonglong log_pos,
group_relay_log_pos
=
event_relay_log_pos
;
strmake_buf
(
group_relay_log_name
,
event_relay_log_name
);
notify_group_relay_log_name_update
();
if
(
log_pos
)
//
3.23 binlogs don't have log_posx
if
(
log_pos
)
//
not 3.23 binlogs (no log_pos there) and not Stop_log_event
group_master_log_pos
=
log_pos
;
}
...
...
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