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
408cb46a
Commit
408cb46a
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
e593209e
Changes
1
Hide 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 @
408cb46a
...
...
@@ -5427,8 +5427,10 @@ 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
,
scanner
->
page_offset
))
==
0
)
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 @@ LSN translog_next_LSN(TRANSLOG_ADDRESS addr, TRANSLOG_ADDRESS horizon)
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