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
5eb78c51
Commit
5eb78c51
authored
Oct 12, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
translog_next_LSN() changed to support pointer to the page end
which can happen when you save address of horizon
parent
212c7dfe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
storage/maria/ma_loghandler.c
storage/maria/ma_loghandler.c
+19
-2
No files found.
storage/maria/ma_loghandler.c
View file @
5eb78c51
...
...
@@ -5427,7 +5427,9 @@ translog_get_next_chunk(TRANSLOG_SCANNER_DATA *scanner)
uint16
len
;
DBUG_ENTER
(
"translog_get_next_chunk"
);
if
((
len
=
translog_get_total_chunk_length
(
scanner
->
page
,
if
(
translog_scanner_eop
(
scanner
))
len
=
TRANSLOG_PAGE_SIZE
-
scanner
->
page_offset
;
else
if
((
len
=
translog_get_total_chunk_length
(
scanner
->
page
,
scanner
->
page_offset
))
==
0
)
DBUG_RETURN
(
1
);
scanner
->
page_offset
+=
len
;
...
...
@@ -6625,6 +6627,20 @@ LSN translog_next_LSN(TRANSLOG_ADDRESS addr, TRANSLOG_ADDRESS horizon)
DBUG_RETURN
(
LSN_IMPOSSIBLE
);
translog_init_scanner
(
addr
,
0
,
&
scanner
,
1
);
/* addr can point not to a chunk beginning but to a page end */
if
(
translog_scanner_eop
(
&
scanner
))
{
if
(
translog_get_next_chunk
(
&
scanner
))
{
result
=
LSN_ERROR
;
goto
out
;
}
if
(
scanner
.
page
==
END_OF_LOG
)
{
result
=
LSN_IMPOSSIBLE
;
goto
out
;
}
}
chunk_type
=
scanner
.
page
[
scanner
.
page_offset
]
&
TRANSLOG_CHUNK_TYPE
;
DBUG_PRINT
(
"info"
,
(
"type: %x byte: %x"
,
(
uint
)
chunk_type
,
...
...
@@ -6657,6 +6673,7 @@ out:
DBUG_RETURN
(
result
);
}
/**
@brief returns the LSN of the first record starting in this log
...
...
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