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
e8cd384d
Commit
e8cd384d
authored
Feb 21, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
5d37bbee
d424ffbd
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
90 additions
and
13 deletions
+90
-13
storage/ndb/src/common/debugger/EventLogger.cpp
storage/ndb/src/common/debugger/EventLogger.cpp
+1
-1
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+4
-0
storage/ndb/src/kernel/blocks/tsman.cpp
storage/ndb/src/kernel/blocks/tsman.cpp
+2
-3
storage/ndb/src/kernel/vm/RWPool.cpp
storage/ndb/src/kernel/vm/RWPool.cpp
+9
-5
storage/ndb/src/kernel/vm/RWPool.hpp
storage/ndb/src/kernel/vm/RWPool.hpp
+3
-1
storage/ndb/src/kernel/vm/WOPool.cpp
storage/ndb/src/kernel/vm/WOPool.cpp
+1
-1
storage/ndb/src/kernel/vm/WOPool.hpp
storage/ndb/src/kernel/vm/WOPool.hpp
+4
-2
storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/test/ndbapi/testNodeRestart.cpp
+66
-0
No files found.
storage/ndb/src/common/debugger/EventLogger.cpp
View file @
e8cd384d
...
...
@@ -963,7 +963,7 @@ const EventLoggerBase::EventRepLogLevelMatrix EventLoggerBase::matrix[] = {
ROW
(
NDBStopCompleted
,
LogLevel
::
llStartUp
,
1
,
Logger
::
LL_INFO
),
ROW
(
NDBStopForced
,
LogLevel
::
llStartUp
,
1
,
Logger
::
LL_ALERT
),
ROW
(
NDBStopAborted
,
LogLevel
::
llStartUp
,
1
,
Logger
::
LL_INFO
),
ROW
(
StartREDOLog
,
LogLevel
::
llStartUp
,
10
,
Logger
::
LL_INFO
),
ROW
(
StartREDOLog
,
LogLevel
::
llStartUp
,
4
,
Logger
::
LL_INFO
),
ROW
(
StartLog
,
LogLevel
::
llStartUp
,
10
,
Logger
::
LL_INFO
),
ROW
(
UNDORecordsExecuted
,
LogLevel
::
llStartUp
,
15
,
Logger
::
LL_INFO
),
ROW
(
StartReport
,
LogLevel
::
llStartUp
,
4
,
Logger
::
LL_INFO
),
...
...
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
e8cd384d
...
...
@@ -12251,6 +12251,10 @@ void Dblqh::execFSCLOSECONF(Signal* signal)
// Set the prev file to check if we shall close it.
logFilePtr
.
i
=
logFilePtr
.
p
->
prevLogFile
;
ptrCheckGuard
(
logFilePtr
,
clogFileFileSize
,
logFileRecord
);
logPartPtr
.
i
=
logFilePtr
.
p
->
logPartRec
;
ptrCheckGuard
(
logPartPtr
,
clogPartFileSize
,
logPartRecord
);
exitFromInvalidate
(
signal
);
return
;
case
LogFileRecord
:
:
CLOSING_INIT
:
...
...
storage/ndb/src/kernel/blocks/tsman.cpp
View file @
e8cd384d
...
...
@@ -1840,6 +1840,7 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal)
ndbrequire
(
m_file_hash
.
find
(
file_ptr
,
file_key
));
struct
req
val
=
lookup_extent
(
req
.
key
.
m_page_no
,
file_ptr
.
p
);
Uint32
page_no_in_extent
=
calc_page_no_in_extent
(
req
.
key
.
m_page_no
,
&
val
);
Page_cache_client
::
Request
preq
;
preq
.
m_page
.
m_page_no
=
val
.
m_extent_page_no
;
...
...
@@ -1865,7 +1866,6 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal)
ndbrequire
(
header
->
m_table
==
req
.
request
.
table_id
);
Uint32
page_no_in_extent
=
calc_page_no_in_extent
(
req
.
key
.
m_page_no
,
&
val
);
Uint32
word
=
header
->
get_free_word_offset
(
page_no_in_extent
);
Uint32
shift
=
SZ
*
(
page_no_in_extent
&
7
);
...
...
@@ -1925,8 +1925,7 @@ Tsman::execALLOC_PAGE_REQ(Signal* signal)
found:
header
->
update_free_bits
(
page_no
,
src_bits
|
UNCOMMITTED_MASK
);
rep
->
bits
=
(
src_bits
&
UNCOMMITTED_MASK
)
>>
UNCOMMITTED_SHIFT
;
rep
->
key
.
m_page_no
=
val
.
m_extent_pages
+
val
.
m_extent_no
*
val
.
m_extent_size
+
page_no
;
rep
->
key
.
m_page_no
=
req
.
key
.
m_page_no
+
page_no
-
page_no_in_extent
;
rep
->
reply
.
errorCode
=
0
;
return
;
}
...
...
storage/ndb/src/kernel/vm/RWPool.cpp
View file @
e8cd384d
...
...
@@ -22,7 +22,7 @@
RWPool
::
RWPool
()
{
bzero
(
this
,
sizeof
(
*
this
));
m_current_pos
=
GLOBAL_PAGE_SIZ
E_WORDS
;
m_current_pos
=
RWPage
::
RWPAG
E_WORDS
;
m_current_first_free
=
REC_NIL
;
m_first_free_page
=
RNIL
;
}
...
...
@@ -57,7 +57,7 @@ seize_free:
m_current_first_free
=
pageP
->
m_data
[
pos
+
m_record_info
.
m_offset_next_pool
];
return
true
;
}
else
if
(
pos
+
size
<
GLOBAL_PAGE_SIZ
E_WORDS
)
else
if
(
pos
+
size
<
RWPage
::
RWPAG
E_WORDS
)
{
seize_first:
ptr
.
i
=
(
m_current_page_no
<<
POOL_RECORD_BITS
)
+
pos
;
...
...
@@ -81,11 +81,14 @@ seize_first:
{
pageP
=
m_current_page
=
m_memroot
+
m_first_free_page
;
m_current_page_no
=
m_first_free_page
;
m_current_pos
=
GLOBAL_PAGE_SIZ
E_WORDS
;
m_current_pos
=
RWPage
::
RWPAG
E_WORDS
;
m_current_first_free
=
m_current_page
->
m_first_free
;
m_first_free_page
=
m_current_page
->
m_next_page
;
m_current_ref_count
=
m_current_page
->
m_ref_count
;
if
(
m_first_free_page
!=
RNIL
)
{
(
m_memroot
+
m_first_free_page
)
->
m_prev_page
=
RNIL
;
}
goto
seize_free
;
}
...
...
@@ -105,7 +108,7 @@ seize_first:
m_current_page
=
0
;
m_current_page_no
=
RNIL
;
m_current_pos
=
GLOBAL_PAGE_SIZ
E_WORDS
;
m_current_pos
=
RWPage
::
RWPAG
E_WORDS
;
m_current_first_free
=
REC_NIL
;
return
false
;
...
...
@@ -154,6 +157,7 @@ RWPool::release(Ptr<void> ptr)
}
page
->
m_next_page
=
ffp
;
page
->
m_prev_page
=
RNIL
;
m_first_free_page
=
ptr_page
;
return
;
}
else
if
(
ref_cnt
==
1
)
...
...
storage/ndb/src/kernel/vm/RWPool.hpp
View file @
e8cd384d
...
...
@@ -20,12 +20,14 @@
struct
RWPage
{
STATIC_CONST
(
RWPAGE_WORDS
=
GLOBAL_PAGE_SIZE_WORDS
-
4
);
Uint32
m_type_id
;
Uint16
m_first_free
;
Uint16
m_ref_count
;
Uint32
m_next_page
;
Uint32
m_prev_page
;
Uint32
m_data
[
GLOBAL_PAGE_SIZE_WORDS
-
4
];
Uint32
m_data
[
RWPAGE_WORDS
];
};
/**
...
...
storage/ndb/src/kernel/vm/WOPool.cpp
View file @
e8cd384d
...
...
@@ -20,7 +20,7 @@
WOPool
::
WOPool
()
{
bzero
(
this
,
sizeof
(
*
this
));
m_current_pos
=
GLOBAL_PAGE_SIZ
E_WORDS
;
m_current_pos
=
WOPage
::
WOPAG
E_WORDS
;
}
void
...
...
storage/ndb/src/kernel/vm/WOPool.hpp
View file @
e8cd384d
...
...
@@ -20,9 +20,11 @@
struct
WOPage
{
STATIC_CONST
(
WOPAGE_WORDS
=
GLOBAL_PAGE_SIZE_WORDS
-
2
);
Uint32
m_type_id
;
Uint32
m_ref_count
;
Uint32
m_data
[
GLOBAL_PAGE_SIZE_WORDS
-
2
];
Uint32
m_data
[
WOPAGE_WORDS
];
};
/**
...
...
@@ -61,7 +63,7 @@ WOPool::seize(Ptr<void>& ptr)
Uint32
pos
=
m_current_pos
;
Uint32
size
=
m_record_info
.
m_size
;
WOPage
*
pageP
=
m_current_page
;
if
(
likely
(
pos
+
size
<
GLOBAL_PAGE_SIZ
E_WORDS
))
if
(
likely
(
pos
+
size
<
WOPage
::
WOPAG
E_WORDS
))
{
ptr
.
i
=
(
m_current_page_no
<<
POOL_RECORD_BITS
)
+
pos
;
ptr
.
p
=
(
pageP
->
m_data
+
pos
);
...
...
storage/ndb/test/ndbapi/testNodeRestart.cpp
View file @
e8cd384d
...
...
@@ -1353,6 +1353,68 @@ runBug26481(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
}
int
runBug26450
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
Uint32
i
;
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
res
;
Ndb
*
pNdb
=
GETNDB
(
step
);
int
node
=
res
.
getRandomNotMasterNodeId
(
rand
());
Vector
<
int
>
nodes
;
for
(
unsigned
i
=
0
;
i
<
res
.
getNumDbNodes
();
i
++
)
{
if
(
res
.
getDbNodeId
(
i
)
!=
node
)
nodes
.
push_back
(
res
.
getDbNodeId
(
i
));
}
if
(
res
.
restartAll
())
return
NDBT_FAILED
;
if
(
res
.
waitClusterStarted
())
return
NDBT_FAILED
;
ndbout_c
(
"node: %d"
,
node
);
if
(
res
.
restartOneDbNode
(
node
,
false
,
true
,
true
))
return
NDBT_FAILED
;
if
(
res
.
waitNodesNoStart
(
&
node
,
1
))
return
NDBT_FAILED
;
if
(
runClearTable
(
ctx
,
step
))
return
NDBT_FAILED
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
res
.
restartAll
(
false
,
true
,
i
>
0
))
return
NDBT_FAILED
;
if
(
res
.
waitClusterNoStart
())
return
NDBT_FAILED
;
if
(
res
.
startNodes
(
nodes
.
getBase
(),
nodes
.
size
()))
return
NDBT_FAILED
;
if
(
res
.
waitNodesStarted
(
nodes
.
getBase
(),
nodes
.
size
()))
return
NDBT_FAILED
;
}
if
(
res
.
startNodes
(
&
node
,
1
))
return
NDBT_FAILED
;
if
(
res
.
waitNodesStarted
(
&
node
,
1
))
return
NDBT_FAILED
;
HugoTransactions
trans
(
*
ctx
->
getTab
());
if
(
trans
.
selectCount
(
pNdb
)
!=
0
)
return
NDBT_FAILED
;
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testNodeRestart
);
TESTCASE
(
"NoLoad"
,
"Test that one node at a time can be stopped and then restarted "
\
...
...
@@ -1697,6 +1759,10 @@ TESTCASE("Bug26457", ""){
TESTCASE
(
"Bug26481"
,
""
){
INITIALIZER
(
runBug26481
);
}
TESTCASE
(
"Bug26450"
,
""
){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runBug26450
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
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