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
3c6ec2a9
Commit
3c6ec2a9
authored
Sep 05, 2005
by
tulin@dl145b.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed small bug in ndb redolog printer
+ added option to dumpe rest of page after exnd of data
parent
613258e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
+3
-1
ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp
ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp
+1
-1
ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp
...c/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp
+19
-6
No files found.
ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
View file @
3c6ec2a9
...
...
@@ -134,7 +134,9 @@ bool PrepareOperationRecord::check() {
return
true
;
}
Uint32
PrepareOperationRecord
::
getLogRecordSize
()
{
Uint32
PrepareOperationRecord
::
getLogRecordSize
(
Uint32
wordsRead
)
{
if
(
wordsRead
<
2
)
return
2
;
// make sure we read more
return
m_logRecordSize
;
}
...
...
ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp
View file @
3c6ec2a9
...
...
@@ -83,7 +83,7 @@ class PrepareOperationRecord {
friend
NdbOut
&
operator
<<
(
NdbOut
&
,
const
PrepareOperationRecord
&
);
public:
bool
check
();
Uint32
getLogRecordSize
();
Uint32
getLogRecordSize
(
Uint32
wordsRead
);
protected:
Uint32
m_recordType
;
...
...
ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp
View file @
3c6ec2a9
...
...
@@ -41,6 +41,7 @@ void doExit();
FILE
*
f
=
0
;
char
fileName
[
256
];
bool
theDumpFlag
=
false
;
bool
thePrintFlag
=
true
;
bool
theCheckFlag
=
true
;
bool
onlyPageHeaders
=
false
;
...
...
@@ -208,7 +209,7 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
case
ZPREP_OP_TYPE
:
poRecord
=
(
PrepareOperationRecord
*
)
redoLogPagePos
;
wordIndex
+=
poRecord
->
getLogRecordSize
();
wordIndex
+=
poRecord
->
getLogRecordSize
(
PAGESIZE
-
wordIndex
);
if
(
wordIndex
<=
PAGESIZE
)
{
if
(
thePrintFlag
)
ndbout
<<
(
*
poRecord
);
if
(
theCheckFlag
)
{
...
...
@@ -277,10 +278,9 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
ndbout
<<
" ------ERROR: UNKNOWN RECORD TYPE------"
<<
endl
;
// Print out remaining data in this page
for
(
int
j
=
wordIndex
;
j
<
PAGESIZE
;
j
++
){
Uint32
unknown
=
redoLogPage
[
i
*
PAGESIZE
+
j
];
ndbout_c
(
"%-30d%-12u%-12x"
,
j
,
unknown
,
unknown
);
for
(
int
k
=
wordIndex
;
k
<
PAGESIZE
;
k
++
){
Uint32
unknown
=
redoLogPage
[
i
*
PAGESIZE
+
k
];
ndbout_c
(
"%-30d%-12u%-12x"
,
k
,
unknown
,
unknown
);
}
doExit
();
...
...
@@ -289,8 +289,19 @@ NDB_COMMAND(redoLogFileReader, "redoLogFileReader", "redoLogFileReader", "Read
if
(
lastPage
)
{
if
(
theDumpFlag
)
{
ndbout
<<
" ------PAGE END: DUMPING REST OF PAGE------"
<<
endl
;
for
(
int
k
=
wordIndex
>
PAGESIZE
?
oldWordIndex
:
wordIndex
;
k
<
PAGESIZE
;
k
++
)
{
Uint32
word
=
redoLogPage
[
i
*
PAGESIZE
+
k
];
ndbout_c
(
"%-30d%-12u%-12x"
,
k
,
word
,
word
);
}
}
break
;
}
if
(
wordIndex
>
PAGESIZE
)
{
words_from_previous_page
=
PAGESIZE
-
oldWordIndex
;
ndbout
<<
" ----------- Record continues on next page -----------"
<<
endl
;
...
...
@@ -353,6 +364,8 @@ void readArguments(int argc, const char** argv)
{
if
(
strcmp
(
argv
[
i
],
"-noprint"
)
==
0
)
{
thePrintFlag
=
false
;
}
else
if
(
strcmp
(
argv
[
i
],
"-dump"
)
==
0
)
{
theDumpFlag
=
true
;
}
else
if
(
strcmp
(
argv
[
i
],
"-nocheck"
)
==
0
)
{
theCheckFlag
=
false
;
}
else
if
(
strcmp
(
argv
[
i
],
"-mbyteheaders"
)
==
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