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
023ce289
Commit
023ce289
authored
Mar 13, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
4fe26832
4a27e9ad
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
127 additions
and
7 deletions
+127
-7
storage/ndb/include/kernel/signaldata/LqhKey.hpp
storage/ndb/include/kernel/signaldata/LqhKey.hpp
+1
-0
storage/ndb/src/kernel/blocks/ERROR_codes.txt
storage/ndb/src/kernel/blocks/ERROR_codes.txt
+11
-2
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+16
-3
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+22
-0
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+1
-1
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
+1
-0
storage/ndb/src/kernel/blocks/restore.cpp
storage/ndb/src/kernel/blocks/restore.cpp
+16
-1
storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/test/ndbapi/testNodeRestart.cpp
+55
-0
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
storage/ndb/include/kernel/signaldata/LqhKey.hpp
View file @
023ce289
...
@@ -582,6 +582,7 @@ class LqhKeyRef {
...
@@ -582,6 +582,7 @@ class LqhKeyRef {
* Reciver(s)
* Reciver(s)
*/
*/
friend
class
Dbtc
;
friend
class
Dbtc
;
friend
class
Restore
;
/**
/**
* Sender(s)
* Sender(s)
...
...
storage/ndb/src/kernel/blocks/ERROR_codes.txt
View file @
023ce289
Next QMGR 1
Next QMGR 1
Next NDBCNTR 100
0
Next NDBCNTR 100
1
Next NDBFS 2000
Next NDBFS 2000
Next DBACC 3002
Next DBACC 3002
Next DBTUP 402
4
Next DBTUP 402
9
Next DBLQH 5045
Next DBLQH 5045
Next DBDICT 6007
Next DBDICT 6007
Next DBDIH 7181
Next DBDIH 7181
...
@@ -512,3 +512,12 @@ Dbtup:
...
@@ -512,3 +512,12 @@ Dbtup:
4022 - addTuxEntries - fail before add of first entry
4022 - addTuxEntries - fail before add of first entry
4023 - addTuxEntries - fail add of last entry (the entry for last index)
4023 - addTuxEntries - fail add of last entry (the entry for last index)
4025: Fail all inserts with out of memory
4026: Fail one insert with oom
4027: Fail inserts randomly with oom
4028: Fail one random insert with oom
NDBCNTR:
1000: Crash insertion on SystemError::CopyFragRef
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
023ce289
...
@@ -10570,6 +10570,15 @@ void Dblqh::copyCompletedLab(Signal* signal)
...
@@ -10570,6 +10570,15 @@ void Dblqh::copyCompletedLab(Signal* signal)
closeCopyLab
(
signal
);
closeCopyLab
(
signal
);
return
;
return
;
}
//if
}
//if
if
(
scanptr
.
p
->
scanState
==
ScanRecord
::
WAIT_LQHKEY_COPY
&&
scanptr
.
p
->
scanErrorCounter
)
{
jam
();
closeCopyLab
(
signal
);
return
;
}
if
(
scanptr
.
p
->
scanState
==
ScanRecord
::
WAIT_LQHKEY_COPY
)
{
if
(
scanptr
.
p
->
scanState
==
ScanRecord
::
WAIT_LQHKEY_COPY
)
{
jam
();
jam
();
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
...
@@ -10658,13 +10667,16 @@ void Dblqh::continueCopyAfterBlockedLab(Signal* signal)
...
@@ -10658,13 +10667,16 @@ void Dblqh::continueCopyAfterBlockedLab(Signal* signal)
void
Dblqh
::
copyLqhKeyRefLab
(
Signal
*
signal
)
void
Dblqh
::
copyLqhKeyRefLab
(
Signal
*
signal
)
{
{
ndbrequire
(
tcConnectptr
.
p
->
transid
[
1
]
==
signal
->
theData
[
4
]);
ndbrequire
(
tcConnectptr
.
p
->
transid
[
1
]
==
signal
->
theData
[
4
]);
tcConnectptr
.
p
->
copyCountWords
-
=
signal
->
theData
[
3
];
Uint32
copyWords
=
signal
->
theData
[
3
];
scanptr
.
i
=
tcConnectptr
.
p
->
tcScanRec
;
scanptr
.
i
=
tcConnectptr
.
p
->
tcScanRec
;
c_scanRecordPool
.
getPtr
(
scanptr
);
c_scanRecordPool
.
getPtr
(
scanptr
);
scanptr
.
p
->
scanErrorCounter
++
;
scanptr
.
p
->
scanErrorCounter
++
;
tcConnectptr
.
p
->
errorCode
=
terrorCode
;
tcConnectptr
.
p
->
errorCode
=
terrorCode
;
closeCopyLab
(
signal
);
return
;
LqhKeyConf
*
conf
=
(
LqhKeyConf
*
)
signal
->
getDataPtrSend
();
conf
->
transId1
=
copyWords
;
conf
->
transId2
=
tcConnectptr
.
p
->
transid
[
1
];
copyCompletedLab
(
signal
);
}
//Dblqh::copyLqhKeyRefLab()
}
//Dblqh::copyLqhKeyRefLab()
void
Dblqh
::
closeCopyLab
(
Signal
*
signal
)
void
Dblqh
::
closeCopyLab
(
Signal
*
signal
)
...
@@ -10675,6 +10687,7 @@ void Dblqh::closeCopyLab(Signal* signal)
...
@@ -10675,6 +10687,7 @@ void Dblqh::closeCopyLab(Signal* signal)
// Wait until all of those have arrived until we start the
// Wait until all of those have arrived until we start the
// close process.
// close process.
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
scanptr
.
p
->
scanState
=
ScanRecord
::
WAIT_LQHKEY_COPY
;
jam
();
jam
();
return
;
return
;
}
//if
}
//if
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
023ce289
...
@@ -1259,6 +1259,28 @@ int Dbtup::handleInsertReq(Signal* signal,
...
@@ -1259,6 +1259,28 @@ int Dbtup::handleInsertReq(Signal* signal,
{
{
shrink_tuple
(
req_struct
,
sizes
+
2
,
regTabPtr
,
true
);
shrink_tuple
(
req_struct
,
sizes
+
2
,
regTabPtr
,
true
);
}
}
if
(
ERROR_INSERTED
(
4025
))
{
goto
mem_error
;
}
if
(
ERROR_INSERTED
(
4026
))
{
CLEAR_ERROR_INSERT_VALUE
;
goto
mem_error
;
}
if
(
ERROR_INSERTED
(
4027
)
&&
(
rand
()
%
100
)
>
25
)
{
goto
mem_error
;
}
if
(
ERROR_INSERTED
(
4028
)
&&
(
rand
()
%
100
)
>
25
)
{
CLEAR_ERROR_INSERT_VALUE
;
goto
mem_error
;
}
/**
/**
* Alloc memory
* Alloc memory
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
View file @
023ce289
...
@@ -112,6 +112,7 @@ Dbtup::Dbtup(Block_context& ctx, Pgman* pgman)
...
@@ -112,6 +112,7 @@ Dbtup::Dbtup(Block_context& ctx, Pgman* pgman)
cnoOfAllocatedPages
=
0
;
cnoOfAllocatedPages
=
0
;
initData
();
initData
();
CLEAR_ERROR_INSERT_VALUE
;
}
//Dbtup::Dbtup()
}
//Dbtup::Dbtup()
Dbtup
::~
Dbtup
()
Dbtup
::~
Dbtup
()
...
@@ -262,7 +263,6 @@ void Dbtup::execSTTOR(Signal* signal)
...
@@ -262,7 +263,6 @@ void Dbtup::execSTTOR(Signal* signal)
switch
(
startPhase
)
{
switch
(
startPhase
)
{
case
ZSTARTPHASE1
:
case
ZSTARTPHASE1
:
ljam
();
ljam
();
CLEAR_ERROR_INSERT_VALUE
;
ndbrequire
((
c_lqh
=
(
Dblqh
*
)
globalData
.
getBlock
(
DBLQH
))
!=
0
);
ndbrequire
((
c_lqh
=
(
Dblqh
*
)
globalData
.
getBlock
(
DBLQH
))
!=
0
);
ndbrequire
((
c_tsman
=
(
Tsman
*
)
globalData
.
getBlock
(
TSMAN
))
!=
0
);
ndbrequire
((
c_tsman
=
(
Tsman
*
)
globalData
.
getBlock
(
TSMAN
))
!=
0
);
ndbrequire
((
c_lgman
=
(
Lgman
*
)
globalData
.
getBlock
(
LGMAN
))
!=
0
);
ndbrequire
((
c_lgman
=
(
Lgman
*
)
globalData
.
getBlock
(
LGMAN
))
!=
0
);
...
...
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
View file @
023ce289
...
@@ -197,6 +197,7 @@ void Ndbcntr::execSYSTEM_ERROR(Signal* signal)
...
@@ -197,6 +197,7 @@ void Ndbcntr::execSYSTEM_ERROR(Signal* signal)
break
;
break
;
case
SystemError
:
:
CopyFragRefError
:
case
SystemError
:
:
CopyFragRefError
:
CRASH_INSERTION
(
1000
);
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
"Killed by node %d as "
"Killed by node %d as "
"copyfrag failed, error: %u"
,
"copyfrag failed, error: %u"
,
...
...
storage/ndb/src/kernel/blocks/restore.cpp
View file @
023ce289
...
@@ -1151,8 +1151,23 @@ Restore::calulate_hash(Uint32 tableId, const Uint32 *src)
...
@@ -1151,8 +1151,23 @@ Restore::calulate_hash(Uint32 tableId, const Uint32 *src)
}
}
void
void
Restore
::
execLQHKEYREF
(
Signal
*
)
Restore
::
execLQHKEYREF
(
Signal
*
signal
)
{
{
FilePtr
file_ptr
;
LqhKeyRef
*
ref
=
(
LqhKeyRef
*
)
signal
->
getDataPtr
();
m_file_pool
.
getPtr
(
file_ptr
,
ref
->
connectPtr
);
char
buf
[
255
],
name
[
100
];
BaseString
::
snprintf
(
name
,
sizeof
(
name
),
"%u/T%dF%d"
,
file_ptr
.
p
->
m_lcp_no
,
file_ptr
.
p
->
m_table_id
,
file_ptr
.
p
->
m_fragment_id
);
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
"Error %d during restore of %s"
,
ref
->
errorCode
,
name
);
progError
(
__LINE__
,
NDBD_EXIT_INVALID_LCP_FILE
,
buf
);
ndbrequire
(
false
);
ndbrequire
(
false
);
}
}
...
...
storage/ndb/test/ndbapi/testNodeRestart.cpp
View file @
023ce289
...
@@ -1415,6 +1415,58 @@ runBug26450(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -1415,6 +1415,58 @@ runBug26450(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
return
NDBT_OK
;
}
}
int
runBug27003
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
res
;
static
const
int
errnos
[]
=
{
4025
,
4026
,
4027
,
4028
,
0
};
int
node
=
res
.
getRandomNotMasterNodeId
(
rand
());
ndbout_c
(
"node: %d"
,
node
);
if
(
res
.
restartOneDbNode
(
node
,
true
,
true
,
true
))
return
NDBT_FAILED
;
Uint32
pos
=
0
;
for
(
Uint32
i
=
0
;
i
<
loops
;
i
++
)
{
while
(
errnos
[
pos
]
!=
0
)
{
ndbout_c
(
"Tesing err: %d"
,
errnos
[
pos
]);
if
(
res
.
waitNodesNoStart
(
&
node
,
1
))
return
NDBT_FAILED
;
if
(
res
.
insertErrorInNode
(
node
,
1000
))
return
NDBT_FAILED
;
if
(
res
.
insertErrorInNode
(
node
,
errnos
[
pos
]))
return
NDBT_FAILED
;
int
val2
[]
=
{
DumpStateOrd
::
CmvmiSetRestartOnErrorInsert
,
3
};
if
(
res
.
dumpStateOneNode
(
node
,
val2
,
2
))
return
NDBT_FAILED
;
res
.
startNodes
(
&
node
,
1
);
res
.
waitNodesStartPhase
(
&
node
,
1
,
2
);
pos
++
;
}
pos
=
0
;
}
if
(
res
.
waitNodesNoStart
(
&
node
,
1
))
return
NDBT_FAILED
;
res
.
startNodes
(
&
node
,
1
);
if
(
res
.
waitClusterStarted
())
return
NDBT_FAILED
;
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testNodeRestart
);
NDBT_TESTSUITE
(
testNodeRestart
);
TESTCASE
(
"NoLoad"
,
TESTCASE
(
"NoLoad"
,
"Test that one node at a time can be stopped and then restarted "
\
"Test that one node at a time can be stopped and then restarted "
\
...
@@ -1763,6 +1815,9 @@ TESTCASE("Bug26450", ""){
...
@@ -1763,6 +1815,9 @@ TESTCASE("Bug26450", ""){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runBug26450
);
INITIALIZER
(
runBug26450
);
}
}
TESTCASE
(
"Bug27003"
,
""
){
INITIALIZER
(
runBug27003
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
int
main
(
int
argc
,
const
char
**
argv
){
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
023ce289
...
@@ -469,6 +469,10 @@ max-time: 1000
...
@@ -469,6 +469,10 @@ max-time: 1000
cmd: testScan
cmd: testScan
args: -n ScanVariants
args: -n ScanVariants
max-time: 1000
cmd: testNodeRestart
args: -n Bug27003 T1
max-time: 500
max-time: 500
cmd: testNodeRestart
cmd: testNodeRestart
args: -n Bug15587 T1
args: -n Bug15587 T1
...
...
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