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
4a846e01
Commit
4a846e01
authored
May 18, 2017
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make IF clear.
parent
b5cdf014
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
storage/maria/ma_loghandler.c
storage/maria/ma_loghandler.c
+17
-8
No files found.
storage/maria/ma_loghandler.c
View file @
4a846e01
...
...
@@ -7814,8 +7814,24 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
translog_force_current_buffer_to_finish
();
translog_buffer_unlock
(
buffer
);
}
else
if
(
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
!=
LSN_IMPOSSIBLE
)
else
{
if
(
log_descriptor
.
bc
.
buffer
->
last_lsn
==
LSN_IMPOSSIBLE
)
{
/*
In this case both last_lsn & prev_last_lsn are LSN_IMPOSSIBLE
otherwise it will go in the first IF because LSN_IMPOSSIBLE less
then any real LSN and cmp_translog_addr(*lsn,
log_descriptor.bc.buffer->prev_last_lsn) will be TRUE
*/
DBUG_ASSERT
(
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
==
LSN_IMPOSSIBLE
);
DBUG_PRINT
(
"info"
,
(
"There is no LSNs yet generated => do nothing"
));
translog_unlock
();
DBUG_VOID_RETURN
;
}
DBUG_ASSERT
(
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
!=
LSN_IMPOSSIBLE
);
/* fix lsn if it was horizon */
*
lsn
=
log_descriptor
.
bc
.
buffer
->
prev_last_lsn
;
DBUG_PRINT
(
"info"
,
(
"LSN to flush fixed to prev last lsn: (%lu,0x%lx)"
,
...
...
@@ -7824,13 +7840,6 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
TRANSLOG_BUFFERS_NO
);
translog_unlock
();
}
else
if
(
log_descriptor
.
bc
.
buffer
->
last_lsn
==
LSN_IMPOSSIBLE
)
{
DBUG_PRINT
(
"info"
,
(
"There is no LSNs yet generated => do nothing"
));
translog_unlock
();
DBUG_VOID_RETURN
;
}
/* flush buffers */
*
sent_to_disk
=
translog_get_sent_to_disk
();
if
(
cmp_translog_addr
(
*
lsn
,
*
sent_to_disk
)
>
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