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
43c2bc2f
Commit
43c2bc2f
authored
Sep 08, 2005
by
mronstrom@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #12594: A few fixes
parent
6dbca028
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
65 deletions
+40
-65
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+2
-2
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+28
-62
ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
+10
-1
No files found.
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
View file @
43c2bc2f
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
#define ZPOS_PAGE_I 13
#define ZPOS_PAGE_I 13
#define ZPOS_PLACE_WRITTEN_FROM 14
#define ZPOS_PLACE_WRITTEN_FROM 14
#define ZPOS_PAGE_NO 15
#define ZPOS_PAGE_NO 15
#define ZPOS_FILE_NO 16
#define ZPOS_
PAGE_
FILE_NO 16
#define ZPOS_WORD_WRITTEN 17
#define ZPOS_WORD_WRITTEN 17
#define ZPOS_IN_WRITING 18
#define ZPOS_IN_WRITING 18
#define ZPOS_PREV_PAGE_NO 19
#define ZPOS_PREV_PAGE_NO 19
...
@@ -2289,7 +2289,7 @@ private:
...
@@ -2289,7 +2289,7 @@ private:
const
LogPartRecordPtr
&
sltLogPartPtr
);
const
LogPartRecordPtr
&
sltLogPartPtr
);
void
checkGcpCompleted
(
Signal
*
signal
,
Uint32
pageWritten
,
Uint32
wordWritten
);
void
checkGcpCompleted
(
Signal
*
signal
,
Uint32
pageWritten
,
Uint32
wordWritten
);
void
initFsopenconf
(
Signal
*
signal
);
void
initFsopenconf
(
Signal
*
signal
);
void
initFsrwconf
(
Signal
*
signal
);
void
initFsrwconf
(
Signal
*
signal
,
bool
write
);
void
initLfo
(
Signal
*
signal
);
void
initLfo
(
Signal
*
signal
);
void
initLogfile
(
Signal
*
signal
,
Uint32
fileNo
);
void
initLogfile
(
Signal
*
signal
,
Uint32
fileNo
);
void
initLogpage
(
Signal
*
signal
);
void
initLogpage
(
Signal
*
signal
);
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
43c2bc2f
...
@@ -11749,42 +11749,34 @@ void Dblqh::execFSCLOSECONF(Signal* signal)
...
@@ -11749,42 +11749,34 @@ void Dblqh::execFSCLOSECONF(Signal* signal)
ptrCheckGuard
(
logFilePtr
,
clogFileFileSize
,
logFileRecord
);
ptrCheckGuard
(
logFilePtr
,
clogFileFileSize
,
logFileRecord
);
exitFromInvalidate
(
signal
);
exitFromInvalidate
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
CLOSING_INIT
:
case
LogFileRecord
:
:
CLOSING_INIT
:
jam
();
jam
();
closingInitLab
(
signal
);
closingInitLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
CLOSING_SR
:
case
LogFileRecord
:
:
CLOSING_SR
:
jam
();
jam
();
closingSrLab
(
signal
);
closingSrLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
CLOSING_EXEC_SR
:
case
LogFileRecord
:
:
CLOSING_EXEC_SR
:
jam
();
jam
();
closeExecSrLab
(
signal
);
closeExecSrLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
CLOSING_EXEC_SR_COMPLETED
:
case
LogFileRecord
:
:
CLOSING_EXEC_SR_COMPLETED
:
jam
();
jam
();
closeExecSrCompletedLab
(
signal
);
closeExecSrCompletedLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
CLOSING_WRITE_LOG
:
case
LogFileRecord
:
:
CLOSING_WRITE_LOG
:
jam
();
jam
();
closeWriteLogLab
(
signal
);
closeWriteLogLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
CLOSING_EXEC_LOG
:
case
LogFileRecord
:
:
CLOSING_EXEC_LOG
:
jam
();
jam
();
closeExecLogLab
(
signal
);
closeExecLogLab
(
signal
);
return
;
return
;
break
;
default:
default:
jam
();
jam
();
systemErrorLab
(
signal
);
systemErrorLab
(
signal
);
return
;
return
;
break
;
}
//switch
}
//switch
}
//Dblqh::execFSCLOSECONF()
}
//Dblqh::execFSCLOSECONF()
...
@@ -11802,77 +11794,64 @@ void Dblqh::execFSOPENCONF(Signal* signal)
...
@@ -11802,77 +11794,64 @@ void Dblqh::execFSOPENCONF(Signal* signal)
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
readFileInInvalidate
(
signal
);
readFileInInvalidate
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPENING_INIT
:
case
LogFileRecord
:
:
OPENING_INIT
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openFileInitLab
(
signal
);
openFileInitLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_SR_FRONTPAGE
:
case
LogFileRecord
:
:
OPEN_SR_FRONTPAGE
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openSrFrontpageLab
(
signal
);
openSrFrontpageLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_SR_LAST_FILE
:
case
LogFileRecord
:
:
OPEN_SR_LAST_FILE
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openSrLastFileLab
(
signal
);
openSrLastFileLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_SR_NEXT_FILE
:
case
LogFileRecord
:
:
OPEN_SR_NEXT_FILE
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openSrNextFileLab
(
signal
);
openSrNextFileLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_EXEC_SR_START
:
case
LogFileRecord
:
:
OPEN_EXEC_SR_START
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openExecSrStartLab
(
signal
);
openExecSrStartLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_EXEC_SR_NEW_MBYTE
:
case
LogFileRecord
:
:
OPEN_EXEC_SR_NEW_MBYTE
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openExecSrNewMbyteLab
(
signal
);
openExecSrNewMbyteLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_SR_FOURTH_PHASE
:
case
LogFileRecord
:
:
OPEN_SR_FOURTH_PHASE
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openSrFourthPhaseLab
(
signal
);
openSrFourthPhaseLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_SR_FOURTH_NEXT
:
case
LogFileRecord
:
:
OPEN_SR_FOURTH_NEXT
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openSrFourthNextLab
(
signal
);
openSrFourthNextLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_SR_FOURTH_ZERO
:
case
LogFileRecord
:
:
OPEN_SR_FOURTH_ZERO
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openSrFourthZeroLab
(
signal
);
openSrFourthZeroLab
(
signal
);
return
;
return
;
break
;
case
LogFileRecord
:
:
OPENING_WRITE_LOG
:
case
LogFileRecord
:
:
OPENING_WRITE_LOG
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
return
;
return
;
break
;
case
LogFileRecord
:
:
OPEN_EXEC_LOG
:
case
LogFileRecord
:
:
OPEN_EXEC_LOG
:
jam
();
jam
();
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN
;
openExecLogLab
(
signal
);
openExecLogLab
(
signal
);
return
;
return
;
break
;
default:
default:
jam
();
jam
();
systemErrorLab
(
signal
);
systemErrorLab
(
signal
);
return
;
return
;
break
;
}
//switch
}
//switch
}
//Dblqh::execFSOPENCONF()
}
//Dblqh::execFSOPENCONF()
...
@@ -11883,7 +11862,7 @@ void Dblqh::execFSOPENCONF(Signal* signal)
...
@@ -11883,7 +11862,7 @@ void Dblqh::execFSOPENCONF(Signal* signal)
void
Dblqh
::
execFSREADCONF
(
Signal
*
signal
)
void
Dblqh
::
execFSREADCONF
(
Signal
*
signal
)
{
{
jamEntry
();
jamEntry
();
initFsrwconf
(
signal
);
initFsrwconf
(
signal
,
false
);
switch
(
lfoPtr
.
p
->
lfoState
)
{
switch
(
lfoPtr
.
p
->
lfoState
)
{
case
LogFileOperationRecord
:
:
READ_SR_LAST_MBYTE
:
case
LogFileOperationRecord
:
:
READ_SR_LAST_MBYTE
:
...
@@ -11891,57 +11870,47 @@ void Dblqh::execFSREADCONF(Signal* signal)
...
@@ -11891,57 +11870,47 @@ void Dblqh::execFSREADCONF(Signal* signal)
releaseLfo
(
signal
);
releaseLfo
(
signal
);
readSrLastMbyteLab
(
signal
);
readSrLastMbyteLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_SR_FRONTPAGE
:
case
LogFileOperationRecord
:
:
READ_SR_FRONTPAGE
:
jam
();
jam
();
releaseLfo
(
signal
);
releaseLfo
(
signal
);
readSrFrontpageLab
(
signal
);
readSrFrontpageLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_SR_LAST_FILE
:
case
LogFileOperationRecord
:
:
READ_SR_LAST_FILE
:
jam
();
jam
();
releaseLfo
(
signal
);
releaseLfo
(
signal
);
readSrLastFileLab
(
signal
);
readSrLastFileLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_SR_NEXT_FILE
:
case
LogFileOperationRecord
:
:
READ_SR_NEXT_FILE
:
jam
();
jam
();
releaseLfo
(
signal
);
releaseLfo
(
signal
);
readSrNextFileLab
(
signal
);
readSrNextFileLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_EXEC_SR
:
case
LogFileOperationRecord
:
:
READ_EXEC_SR
:
jam
();
jam
();
readExecSrLab
(
signal
);
readExecSrLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_EXEC_LOG
:
case
LogFileOperationRecord
:
:
READ_EXEC_LOG
:
jam
();
jam
();
readExecLogLab
(
signal
);
readExecLogLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_SR_INVALIDATE_PAGES
:
case
LogFileOperationRecord
:
:
READ_SR_INVALIDATE_PAGES
:
jam
();
jam
();
invalidateLogAfterLastGCI
(
signal
);
invalidateLogAfterLastGCI
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_SR_FOURTH_PHASE
:
case
LogFileOperationRecord
:
:
READ_SR_FOURTH_PHASE
:
jam
();
jam
();
releaseLfo
(
signal
);
releaseLfo
(
signal
);
readSrFourthPhaseLab
(
signal
);
readSrFourthPhaseLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
READ_SR_FOURTH_ZERO
:
case
LogFileOperationRecord
:
:
READ_SR_FOURTH_ZERO
:
jam
();
jam
();
releaseLfo
(
signal
);
releaseLfo
(
signal
);
readSrFourthZeroLab
(
signal
);
readSrFourthZeroLab
(
signal
);
return
;
return
;
break
;
default:
default:
jam
();
jam
();
systemErrorLab
(
signal
);
systemErrorLab
(
signal
);
return
;
return
;
break
;
}
//switch
}
//switch
}
//Dblqh::execFSREADCONF()
}
//Dblqh::execFSREADCONF()
...
@@ -11998,63 +11967,52 @@ void Dblqh::execFSREADREF(Signal* signal)
...
@@ -11998,63 +11967,52 @@ void Dblqh::execFSREADREF(Signal* signal)
void
Dblqh
::
execFSWRITECONF
(
Signal
*
signal
)
void
Dblqh
::
execFSWRITECONF
(
Signal
*
signal
)
{
{
jamEntry
();
jamEntry
();
initFsrwconf
(
signal
);
initFsrwconf
(
signal
,
true
);
switch
(
lfoPtr
.
p
->
lfoState
)
{
switch
(
lfoPtr
.
p
->
lfoState
)
{
case
LogFileOperationRecord
:
:
WRITE_SR_INVALIDATE_PAGES
:
case
LogFileOperationRecord
:
:
WRITE_SR_INVALIDATE_PAGES
:
jam
();
jam
();
invalidateLogAfterLastGCI
(
signal
);
invalidateLogAfterLastGCI
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
WRITE_PAGE_ZERO
:
case
LogFileOperationRecord
:
:
WRITE_PAGE_ZERO
:
jam
();
jam
();
writePageZeroLab
(
signal
);
writePageZeroLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
LAST_WRITE_IN_FILE
:
case
LogFileOperationRecord
:
:
LAST_WRITE_IN_FILE
:
jam
();
jam
();
lastWriteInFileLab
(
signal
);
lastWriteInFileLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
INIT_WRITE_AT_END
:
case
LogFileOperationRecord
:
:
INIT_WRITE_AT_END
:
jam
();
jam
();
initWriteEndLab
(
signal
);
initWriteEndLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
INIT_FIRST_PAGE
:
case
LogFileOperationRecord
:
:
INIT_FIRST_PAGE
:
jam
();
jam
();
initFirstPageLab
(
signal
);
initFirstPageLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
WRITE_GCI_ZERO
:
case
LogFileOperationRecord
:
:
WRITE_GCI_ZERO
:
jam
();
jam
();
writeGciZeroLab
(
signal
);
writeGciZeroLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
WRITE_DIRTY
:
case
LogFileOperationRecord
:
:
WRITE_DIRTY
:
jam
();
jam
();
writeDirtyLab
(
signal
);
writeDirtyLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
WRITE_INIT_MBYTE
:
case
LogFileOperationRecord
:
:
WRITE_INIT_MBYTE
:
jam
();
jam
();
writeInitMbyteLab
(
signal
);
writeInitMbyteLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
ACTIVE_WRITE_LOG
:
case
LogFileOperationRecord
:
:
ACTIVE_WRITE_LOG
:
jam
();
jam
();
writeLogfileLab
(
signal
);
writeLogfileLab
(
signal
);
return
;
return
;
break
;
case
LogFileOperationRecord
:
:
FIRST_PAGE_WRITE_IN_LOGFILE
:
case
LogFileOperationRecord
:
:
FIRST_PAGE_WRITE_IN_LOGFILE
:
jam
();
jam
();
firstPageWriteLab
(
signal
);
firstPageWriteLab
(
signal
);
return
;
return
;
break
;
default:
default:
jam
();
jam
();
systemErrorLab
(
signal
);
systemErrorLab
(
signal
);
return
;
return
;
break
;
}
//switch
}
//switch
}
//Dblqh::execFSWRITECONF()
}
//Dblqh::execFSWRITECONF()
...
@@ -12130,11 +12088,13 @@ void Dblqh::initFsopenconf(Signal* signal)
...
@@ -12130,11 +12088,13 @@ void Dblqh::initFsopenconf(Signal* signal)
/* ======= INITIATE WHEN RECEIVING FSREADCONF AND FSWRITECONF ======= */
/* ======= INITIATE WHEN RECEIVING FSREADCONF AND FSWRITECONF ======= */
/* */
/* */
/* ========================================================================= */
/* ========================================================================= */
void
Dblqh
::
initFsrwconf
(
Signal
*
signal
)
void
Dblqh
::
initFsrwconf
(
Signal
*
signal
,
bool
write
)
{
{
LogPageRecordPtr
logP
;
LogPageRecordPtr
logP
;
Uint32
noPages
,
totPages
;
lfoPtr
.
i
=
signal
->
theData
[
0
];
lfoPtr
.
i
=
signal
->
theData
[
0
];
ptrCheckGuard
(
lfoPtr
,
clfoFileSize
,
logFileOperationRecord
);
ptrCheckGuard
(
lfoPtr
,
clfoFileSize
,
logFileOperationRecord
);
totPages
=
lfoPtr
.
p
->
noPagesRw
;
logFilePtr
.
i
=
lfoPtr
.
p
->
logFileRec
;
logFilePtr
.
i
=
lfoPtr
.
p
->
logFileRec
;
ptrCheckGuard
(
logFilePtr
,
clogFileFileSize
,
logFileRecord
);
ptrCheckGuard
(
logFilePtr
,
clogFileFileSize
,
logFileRecord
);
logPartPtr
.
i
=
logFilePtr
.
p
->
logPartRec
;
logPartPtr
.
i
=
logFilePtr
.
p
->
logPartRec
;
...
@@ -12142,14 +12102,20 @@ void Dblqh::initFsrwconf(Signal* signal)
...
@@ -12142,14 +12102,20 @@ void Dblqh::initFsrwconf(Signal* signal)
logPagePtr
.
i
=
lfoPtr
.
p
->
firstLfoPage
;
logPagePtr
.
i
=
lfoPtr
.
p
->
firstLfoPage
;
ptrCheckGuard
(
logPagePtr
,
clogPageFileSize
,
logPageRecord
);
ptrCheckGuard
(
logPagePtr
,
clogPageFileSize
,
logPageRecord
);
logP
=
logPagePtr
;
logP
=
logPagePtr
;
noPages
=
1
;
ndbassert
(
totPages
>
0
);
for
(;;)
for
(;;)
{
{
logP
.
p
->
logPageWord
[
ZPOS_IN_WRITING
]
=
0
;
logP
.
p
->
logPageWord
[
ZPOS_IN_WRITING
]
=
0
;
logP
.
p
->
logPageWord
[
ZPOS_IN_FREE_LIST
]
=
0
;
logP
.
p
->
logPageWord
[
ZPOS_IN_FREE_LIST
]
=
0
;
if
(
logP
.
p
->
logPageWord
[
ZNEXT_PAGE
]
==
RNIL
)
if
(
noPages
==
totPages
)
return
;
return
;
if
(
write
)
logP
.
i
=
logP
.
p
->
logPageWord
[
ZNEXT_PAGE
];
logP
.
i
=
logP
.
p
->
logPageWord
[
ZNEXT_PAGE
];
else
logP
.
i
=
lfoPtr
.
p
->
logPageArray
[
noPages
];
ptrCheckGuard
(
logP
,
clogPageFileSize
,
logPageRecord
);
ptrCheckGuard
(
logP
,
clogPageFileSize
,
logPageRecord
);
noPages
++
;
}
}
}
//Dblqh::initFsrwconf()
}
//Dblqh::initFsrwconf()
...
@@ -12238,7 +12204,7 @@ void Dblqh::timeSup(Signal* signal)
...
@@ -12238,7 +12204,7 @@ void Dblqh::timeSup(Signal* signal)
ndbrequire
(
wordWritten
<
ZPAGE_SIZE
);
ndbrequire
(
wordWritten
<
ZPAGE_SIZE
);
if
(
logFilePtr
.
p
->
noLogpagesInBuffer
>
0
)
{
if
(
logFilePtr
.
p
->
noLogpagesInBuffer
>
0
)
{
jam
();
jam
();
completedLogPage
(
signal
,
ZENFORCE_WRITE
,
11
);
completedLogPage
(
signal
,
ZENFORCE_WRITE
,
__LINE__
);
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*SINCE WE ARE ONLY WRITING PART OF THE LAST PAGE WE HAVE TO UPDATE THE WORD */
/*SINCE WE ARE ONLY WRITING PART OF THE LAST PAGE WE HAVE TO UPDATE THE WORD */
/*WRITTEN TO REFLECT THE REAL LAST WORD WRITTEN. WE ALSO HAVE TO MOVE THE */
/*WRITTEN TO REFLECT THE REAL LAST WORD WRITTEN. WE ALSO HAVE TO MOVE THE */
...
@@ -12261,7 +12227,7 @@ void Dblqh::timeSup(Signal* signal)
...
@@ -12261,7 +12227,7 @@ void Dblqh::timeSup(Signal* signal)
}
else
{
}
else
{
jam
();
jam
();
writeSinglePage
(
signal
,
logFilePtr
.
p
->
currentFilepage
,
writeSinglePage
(
signal
,
logFilePtr
.
p
->
currentFilepage
,
wordWritten
,
1
);
wordWritten
,
__LINE__
);
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
ACTIVE_WRITE_LOG
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
ACTIVE_WRITE_LOG
;
}
//if
}
//if
}
//if
}
//if
...
@@ -12397,7 +12363,7 @@ void Dblqh::firstPageWriteLab(Signal* signal)
...
@@ -12397,7 +12363,7 @@ void Dblqh::firstPageWriteLab(Signal* signal)
logPagePtr
.
i
=
logFilePtr
.
p
->
logPageZero
;
logPagePtr
.
i
=
logFilePtr
.
p
->
logPageZero
;
ptrCheckGuard
(
logPagePtr
,
clogPageFileSize
,
logPageRecord
);
ptrCheckGuard
(
logPagePtr
,
clogPageFileSize
,
logPageRecord
);
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
+
ZPOS_FILE_NO
]
=
fileNo
;
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
+
ZPOS_FILE_NO
]
=
fileNo
;
writeSinglePage
(
signal
,
0
,
ZPAGE_SIZE
-
1
,
2
);
writeSinglePage
(
signal
,
0
,
ZPAGE_SIZE
-
1
,
__LINE__
);
lfoPtr
.
p
->
logFileRec
=
currLogFile
;
lfoPtr
.
p
->
logFileRec
=
currLogFile
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_PAGE_ZERO
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_PAGE_ZERO
;
return
;
return
;
...
@@ -12486,7 +12452,7 @@ void Dblqh::lastWriteInFileLab(Signal* signal)
...
@@ -12486,7 +12452,7 @@ void Dblqh::lastWriteInFileLab(Signal* signal)
logPagePtr
.
i
=
logFilePtr
.
p
->
logPageZero
;
logPagePtr
.
i
=
logFilePtr
.
p
->
logPageZero
;
ptrCheckGuard
(
logPagePtr
,
clogPageFileSize
,
logPageRecord
);
ptrCheckGuard
(
logPagePtr
,
clogPageFileSize
,
logPageRecord
);
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
+
ZPOS_FILE_NO
]
=
fileNo
;
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
+
ZPOS_FILE_NO
]
=
fileNo
;
writeSinglePage
(
signal
,
0
,
ZPAGE_SIZE
-
1
,
3
);
writeSinglePage
(
signal
,
0
,
ZPAGE_SIZE
-
1
,
__LINE__
);
lfoPtr
.
p
->
logFileRec
=
currLogFile
;
lfoPtr
.
p
->
logFileRec
=
currLogFile
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_PAGE_ZERO
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_PAGE_ZERO
;
return
;
return
;
...
@@ -12522,7 +12488,7 @@ void Dblqh::openFileInitLab(Signal* signal)
...
@@ -12522,7 +12488,7 @@ void Dblqh::openFileInitLab(Signal* signal)
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN_INIT
;
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPEN_INIT
;
seizeLogpage
(
signal
);
seizeLogpage
(
signal
);
writeSinglePage
(
signal
,
(
ZNO_MBYTES_IN_FILE
*
ZPAGES_IN_MBYTE
)
-
1
,
writeSinglePage
(
signal
,
(
ZNO_MBYTES_IN_FILE
*
ZPAGES_IN_MBYTE
)
-
1
,
ZPAGE_SIZE
-
1
,
4
);
ZPAGE_SIZE
-
1
,
__LINE__
);
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
INIT_WRITE_AT_END
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
INIT_WRITE_AT_END
;
return
;
return
;
}
//Dblqh::openFileInitLab()
}
//Dblqh::openFileInitLab()
...
@@ -12563,7 +12529,7 @@ void Dblqh::initFirstPageLab(Signal* signal)
...
@@ -12563,7 +12529,7 @@ void Dblqh::initFirstPageLab(Signal* signal)
logPagePtr
.
p
->
logPageWord
[
ZPOS_LOG_LAP
]
=
1
;
logPagePtr
.
p
->
logPageWord
[
ZPOS_LOG_LAP
]
=
1
;
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
]
=
ZCOMPLETED_GCI_TYPE
;
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
]
=
ZCOMPLETED_GCI_TYPE
;
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
+
1
]
=
1
;
logPagePtr
.
p
->
logPageWord
[
ZPAGE_HEADER_SIZE
+
1
]
=
1
;
writeSinglePage
(
signal
,
1
,
ZPAGE_SIZE
-
1
,
5
);
writeSinglePage
(
signal
,
1
,
ZPAGE_SIZE
-
1
,
__LINE__
);
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_GCI_ZERO
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_GCI_ZERO
;
return
;
return
;
}
//if
}
//if
...
@@ -13025,7 +12991,7 @@ void Dblqh::writeFileHeaderOpen(Signal* signal, Uint32 wmoType)
...
@@ -13025,7 +12991,7 @@ void Dblqh::writeFileHeaderOpen(Signal* signal, Uint32 wmoType)
/* LOG FILE. THIS HAS SPECIAL SIGNIFANCE TO FIND */
/* LOG FILE. THIS HAS SPECIAL SIGNIFANCE TO FIND */
/* THE END OF THE LOG AT SYSTEM RESTART. */
/* THE END OF THE LOG AT SYSTEM RESTART. */
/* ------------------------------------------------------- */
/* ------------------------------------------------------- */
writeSinglePage
(
signal
,
0
,
ZPAGE_SIZE
-
1
,
6
);
writeSinglePage
(
signal
,
0
,
ZPAGE_SIZE
-
1
,
__LINE__
);
if
(
wmoType
==
ZINIT
)
{
if
(
wmoType
==
ZINIT
)
{
jam
();
jam
();
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
INIT_FIRST_PAGE
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
INIT_FIRST_PAGE
;
...
@@ -13060,7 +13026,7 @@ void Dblqh::writeInitMbyte(Signal* signal)
...
@@ -13060,7 +13026,7 @@ void Dblqh::writeInitMbyte(Signal* signal)
{
{
initLogpage
(
signal
);
initLogpage
(
signal
);
writeSinglePage
(
signal
,
logFilePtr
.
p
->
currentMbyte
*
ZPAGES_IN_MBYTE
,
writeSinglePage
(
signal
,
logFilePtr
.
p
->
currentMbyte
*
ZPAGES_IN_MBYTE
,
ZPAGE_SIZE
-
1
,
7
);
ZPAGE_SIZE
-
1
,
__LINE__
);
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_INIT_MBYTE
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_INIT_MBYTE
;
}
//Dblqh::writeInitMbyte()
}
//Dblqh::writeInitMbyte()
...
@@ -14547,7 +14513,7 @@ void Dblqh::execSr(Signal* signal)
...
@@ -14547,7 +14513,7 @@ void Dblqh::execSr(Signal* signal)
* IN THIS WE HAVE COMPLETED EXECUTION OF THE CURRENT LOG PAGE
* IN THIS WE HAVE COMPLETED EXECUTION OF THE CURRENT LOG PAGE
* AND CAN WRITE IT TO DISK SINCE IT IS DIRTY.
* AND CAN WRITE IT TO DISK SINCE IT IS DIRTY.
* ----------------------------------------------------------------- */
* ----------------------------------------------------------------- */
writeDirty
(
signal
,
12
);
writeDirty
(
signal
,
__LINE__
);
return
;
return
;
break
;
break
;
case
LogPartRecord
:
:
LES_EXEC_LOG
:
case
LogPartRecord
:
:
LES_EXEC_LOG
:
...
@@ -14558,7 +14524,7 @@ void Dblqh::execSr(Signal* signal)
...
@@ -14558,7 +14524,7 @@ void Dblqh::execSr(Signal* signal)
* ------------------------------------------------------------------- */
* ------------------------------------------------------------------- */
if
(
logFilePtr
.
p
->
currentLogpage
!=
logPartPtr
.
p
->
prevLogpage
)
{
if
(
logFilePtr
.
p
->
currentLogpage
!=
logPartPtr
.
p
->
prevLogpage
)
{
jam
();
jam
();
writeDirty
(
signal
,
13
);
writeDirty
(
signal
,
__LINE__
);
return
;
return
;
}
//if
}
//if
break
;
break
;
...
@@ -15003,7 +14969,7 @@ void Dblqh::invalidateLogAfterLastGCI(Signal* signal) {
...
@@ -15003,7 +14969,7 @@ void Dblqh::invalidateLogAfterLastGCI(Signal* signal) {
logPagePtr
.
p
->
logPageWord
[
ZPOS_LOG_LAP
]
=
0
;
logPagePtr
.
p
->
logPageWord
[
ZPOS_LOG_LAP
]
=
0
;
// Contact NDBFS. Real time break.
// Contact NDBFS. Real time break.
writeSinglePage
(
signal
,
logPartPtr
.
p
->
invalidatePageNo
,
writeSinglePage
(
signal
,
logPartPtr
.
p
->
invalidatePageNo
,
ZPAGE_SIZE
-
1
,
0
);
ZPAGE_SIZE
-
1
,
__LINE__
);
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_SR_INVALIDATE_PAGES
;
lfoPtr
.
p
->
lfoState
=
LogFileOperationRecord
::
WRITE_SR_INVALIDATE_PAGES
;
}
else
{
}
else
{
// We are done with invalidating. Finish start phase 3.4.
// We are done with invalidating. Finish start phase 3.4.
...
@@ -18098,7 +18064,7 @@ void Dblqh::writeLogWord(Signal* signal, Uint32 data)
...
@@ -18098,7 +18064,7 @@ void Dblqh::writeLogWord(Signal* signal, Uint32 data)
logPagePtr
.
p
->
logPageWord
[
ZCURR_PAGE_INDEX
]
=
logPos
+
1
;
logPagePtr
.
p
->
logPageWord
[
ZCURR_PAGE_INDEX
]
=
logPos
+
1
;
if
((
logPos
+
1
)
==
ZPAGE_SIZE
)
{
if
((
logPos
+
1
)
==
ZPAGE_SIZE
)
{
jam
();
jam
();
completedLogPage
(
signal
,
ZNORMAL
,
8
);
completedLogPage
(
signal
,
ZNORMAL
,
__LINE__
);
seizeLogpage
(
signal
);
seizeLogpage
(
signal
);
initLogpage
(
signal
);
initLogpage
(
signal
);
logFilePtr
.
p
->
currentLogpage
=
logPagePtr
.
i
;
logFilePtr
.
p
->
currentLogpage
=
logPagePtr
.
i
;
...
@@ -18156,7 +18122,7 @@ void Dblqh::writeNextLog(Signal* signal)
...
@@ -18156,7 +18122,7 @@ void Dblqh::writeNextLog(Signal* signal)
/* -------------------------------------------------- */
/* -------------------------------------------------- */
/* WE HAVE TO CHANGE LOG FILE */
/* WE HAVE TO CHANGE LOG FILE */
/* -------------------------------------------------- */
/* -------------------------------------------------- */
completedLogPage
(
signal
,
ZLAST_WRITE_IN_FILE
,
9
);
completedLogPage
(
signal
,
ZLAST_WRITE_IN_FILE
,
__LINE__
);
if
(
wnlNextLogFilePtr
.
p
->
fileNo
==
0
)
{
if
(
wnlNextLogFilePtr
.
p
->
fileNo
==
0
)
{
jam
();
jam
();
/* -------------------------------------------------- */
/* -------------------------------------------------- */
...
@@ -18175,7 +18141,7 @@ void Dblqh::writeNextLog(Signal* signal)
...
@@ -18175,7 +18141,7 @@ void Dblqh::writeNextLog(Signal* signal)
/* INCREMENT THE CURRENT MBYTE */
/* INCREMENT THE CURRENT MBYTE */
/* SET PAGE INDEX TO PAGE HEADER SIZE */
/* SET PAGE INDEX TO PAGE HEADER SIZE */
/* -------------------------------------------------- */
/* -------------------------------------------------- */
completedLogPage
(
signal
,
ZENFORCE_WRITE
,
10
);
completedLogPage
(
signal
,
ZENFORCE_WRITE
,
__LINE__
);
twnlNewMbyte
=
logFilePtr
.
p
->
currentMbyte
+
1
;
twnlNewMbyte
=
logFilePtr
.
p
->
currentMbyte
+
1
;
}
//if
}
//if
/* -------------------------------------------------- */
/* -------------------------------------------------- */
...
@@ -18551,7 +18517,7 @@ void Dblqh::writeDbgInfoPageHeader(LogPageRecordPtr logP, Uint32 place,
...
@@ -18551,7 +18517,7 @@ void Dblqh::writeDbgInfoPageHeader(LogPageRecordPtr logP, Uint32 place,
logP
.
p
->
logPageWord
[
ZPOS_PAGE_I
]
=
logP
.
i
;
logP
.
p
->
logPageWord
[
ZPOS_PAGE_I
]
=
logP
.
i
;
logP
.
p
->
logPageWord
[
ZPOS_PLACE_WRITTEN_FROM
]
=
place
;
logP
.
p
->
logPageWord
[
ZPOS_PLACE_WRITTEN_FROM
]
=
place
;
logP
.
p
->
logPageWord
[
ZPOS_PAGE_NO
]
=
pageNo
;
logP
.
p
->
logPageWord
[
ZPOS_PAGE_NO
]
=
pageNo
;
logP
.
p
->
logPageWord
[
ZPOS_FILE_NO
]
=
logFilePtr
.
p
->
fileNo
;
logP
.
p
->
logPageWord
[
ZPOS_
PAGE_
FILE_NO
]
=
logFilePtr
.
p
->
fileNo
;
logP
.
p
->
logPageWord
[
ZPOS_WORD_WRITTEN
]
=
wordWritten
;
logP
.
p
->
logPageWord
[
ZPOS_WORD_WRITTEN
]
=
wordWritten
;
logP
.
p
->
logPageWord
[
ZPOS_IN_WRITING
]
=
1
;
logP
.
p
->
logPageWord
[
ZPOS_IN_WRITING
]
=
1
;
}
}
...
...
ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
View file @
43c2bc2f
...
@@ -267,6 +267,15 @@ NdbOut& operator<<(NdbOut& no, const PageHeader& ph) {
...
@@ -267,6 +267,15 @@ NdbOut& operator<<(NdbOut& no, const PageHeader& ph) {
printOut
(
"Oldest prepare op. file No.:"
,
ph
.
m_old_prepare_file_number
);
printOut
(
"Oldest prepare op. file No.:"
,
ph
.
m_old_prepare_file_number
);
printOut
(
"Oldest prepare op. page ref.:"
,
ph
.
m_old_prepare_page_reference
);
printOut
(
"Oldest prepare op. page ref.:"
,
ph
.
m_old_prepare_page_reference
);
printOut
(
"Dirty flag:"
,
ph
.
m_dirty_flag
);
printOut
(
"Dirty flag:"
,
ph
.
m_dirty_flag
);
printOut
(
"Write Timer:"
,
ph
.
m_log_timer
);
printOut
(
"Page i-val:"
,
ph
.
m_page_i_value
);
printOut
(
"Place written:"
,
ph
.
m_place_written_from
);
printOut
(
"Page No in File:"
,
ph
.
m_page_no
);
printOut
(
"File No:"
,
ph
.
m_file_no
);
printOut
(
"Word Written:"
,
ph
.
m_word_written
);
printOut
(
"In Writing (should be 1)"
,
ph
.
m_in_writing_flag
);
printOut
(
"Prev Page No (can be garbage)"
,
ph
.
m_prev_page_no
);
printOut
(
"In Free List (should be 0):"
,
ph
.
m_in_free_list
);
no
<<
endl
;
no
<<
endl
;
return
no
;
return
no
;
}
}
...
...
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