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
2429b3ad
Commit
2429b3ad
authored
Nov 21, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into perch.ndb.mysql.com:/home/jonas/src/50-work
parents
ac79cbb1
e9ac48f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
4 deletions
+86
-4
ndb/src/kernel/blocks/ERROR_codes.txt
ndb/src/kernel/blocks/ERROR_codes.txt
+6
-1
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+36
-2
ndb/test/ndbapi/testScan.cpp
ndb/test/ndbapi/testScan.cpp
+40
-1
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
ndb/src/kernel/blocks/ERROR_codes.txt
View file @
2429b3ad
...
...
@@ -6,7 +6,7 @@ Next DBTUP 4014
Next DBLQH 5043
Next DBDICT 6007
Next DBDIH 7178
Next DBTC 803
8
Next DBTC 803
9
Next CMVMI 9000
Next BACKUP 10022
Next DBUTIL 11002
...
...
@@ -287,6 +287,11 @@ ABORT OF TCKEYREQ
8037 : Invalid schema version in TCINDXREQ
------
8038 : Simulate API disconnect just after SCAN_TAB_REQ
CMVMI
-----
9000 Set RestartOnErrorInsert to restart -n
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
2429b3ad
...
...
@@ -8701,6 +8701,20 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
* IF ANY TO RECEIVE.
**********************************************************/
scanptr
.
p
->
scanState
=
ScanRecord
::
WAIT_AI
;
if
(
ERROR_INSERTED
(
8038
))
{
/**
* Force API_FAILREQ
*/
DisconnectRep
*
const
rep
=
(
DisconnectRep
*
)
signal
->
getDataPtrSend
();
rep
->
nodeId
=
refToNode
(
apiConnectptr
.
p
->
ndbapiBlockref
);
rep
->
err
=
8038
;
EXECUTE_DIRECT
(
CMVMI
,
GSN_DISCONNECT_REP
,
signal
,
2
);
CLEAR_ERROR_INSERT_VALUE
;
}
return
;
SCAN_error_check:
...
...
@@ -8790,6 +8804,7 @@ void Dbtc::initScanrec(ScanRecordPtr scanptr,
jam
();
ScanFragRecPtr
ptr
;
ndbrequire
(
list
.
seize
(
ptr
));
ptr
.
p
->
scanFragState
=
ScanFragRec
::
IDLE
;
ptr
.
p
->
scanRec
=
scanptr
.
i
;
ptr
.
p
->
scanFragId
=
0
;
ptr
.
p
->
m_apiPtr
=
cdata
[
i
];
...
...
@@ -9582,9 +9597,17 @@ Dbtc::close_scan_req(Signal* signal, ScanRecordPtr scanPtr, bool req_received){
ScanRecord
*
scanP
=
scanPtr
.
p
;
ndbrequire
(
scanPtr
.
p
->
scanState
!=
ScanRecord
::
IDLE
);
ScanRecord
::
ScanState
old
=
scanPtr
.
p
->
scanState
;
scanPtr
.
p
->
scanState
=
ScanRecord
::
CLOSING_SCAN
;
scanPtr
.
p
->
m_close_scan_req
=
req_received
;
if
(
old
==
ScanRecord
::
WAIT_FRAGMENT_COUNT
)
{
jam
();
scanPtr
.
p
->
scanState
=
old
;
return
;
// Will continue on execDI_FCOUNTCONF
}
/**
* Queue : Action
* ============= : =================
...
...
@@ -9612,11 +9635,22 @@ Dbtc::close_scan_req(Signal* signal, ScanRecordPtr scanPtr, bool req_received){
ScanFragRecPtr
curr
=
ptr
;
// Remove while iterating...
running
.
next
(
ptr
);
if
(
curr
.
p
->
scanFragState
==
ScanFragRec
::
WAIT_GET_PRIMCONF
){
switch
(
curr
.
p
->
scanFragState
){
case
ScanFragRec
:
:
IDLE
:
jam
();
// real early abort
ndbrequire
(
old
==
ScanRecord
::
WAIT_AI
);
running
.
release
(
curr
);
continue
;
case
ScanFragRec
:
:
WAIT_GET_PRIMCONF
:
jam
();
continue
;
case
ScanFragRec
:
:
LQH_ACTIVE
:
jam
();
break
;
default:
jamLine
(
curr
.
p
->
scanFragState
);
ndbrequire
(
false
);
}
ndbrequire
(
curr
.
p
->
scanFragState
==
ScanFragRec
::
LQH_ACTIVE
);
curr
.
p
->
startFragTimer
(
ctcTimer
);
curr
.
p
->
scanFragState
=
ScanFragRec
::
LQH_ACTIVE
;
...
...
ndb/test/ndbapi/testScan.cpp
View file @
2429b3ad
...
...
@@ -630,7 +630,7 @@ int runRestarter(NDBT_Context* ctx, NDBT_Step* step){
int
nodeId
=
restarter
.
getDbNodeId
(
lastId
);
lastId
=
(
lastId
+
1
)
%
restarter
.
getNumDbNodes
();
if
(
restarter
.
restartOneDbNode
(
nodeId
)
!=
0
){
if
(
restarter
.
restartOneDbNode
(
nodeId
,
false
,
false
,
true
)
!=
0
){
g_err
<<
"Failed to restartNextDbNode"
<<
endl
;
result
=
NDBT_FAILED
;
break
;
...
...
@@ -1125,6 +1125,39 @@ runScanParallelism(NDBT_Context* ctx, NDBT_Step* step){
return
NDBT_OK
;
}
int
runBug24447
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
loops
=
1
;
//ctx->getNumLoops();
int
records
=
ctx
->
getNumRecords
();
int
abort
=
ctx
->
getProperty
(
"AbortProb"
,
15
);
NdbRestarter
restarter
;
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
int
i
=
0
;
while
(
i
<
loops
&&
!
ctx
->
isTestStopped
())
{
g_info
<<
i
++
<<
": "
;
int
nodeId
=
restarter
.
getRandomNotMasterNodeId
(
rand
());
if
(
nodeId
==
-
1
)
nodeId
=
restarter
.
getMasterNodeId
();
if
(
restarter
.
insertErrorInNode
(
nodeId
,
8038
)
!=
0
)
{
ndbout
<<
"Could not insert error in node="
<<
nodeId
<<
endl
;
return
NDBT_FAILED
;
}
for
(
Uint32
j
=
0
;
i
<
10
;
i
++
)
{
hugoTrans
.
scanReadRecords
(
GETNDB
(
step
),
records
,
abort
,
0
,
NdbOperation
::
LM_CommittedRead
);
}
}
restarter
.
insertErrorInAllNodes
(
0
);
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testScan
);
TESTCASE
(
"ScanRead"
,
"Verify scan requirement: It should be possible "
\
...
...
@@ -1603,6 +1636,12 @@ TESTCASE("ScanParallelism",
STEP
(
runScanParallelism
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"Bug24447"
,
""
){
INITIALIZER
(
runLoadTable
);
STEP
(
runBug24447
);
FINALIZER
(
runClearTable
);
}
NDBT_TESTSUITE_END
(
testScan
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
2429b3ad
...
...
@@ -413,6 +413,10 @@ max-time: 500
cmd: testScan
args: -n ScanParallelism
max-time: 500
cmd: testScan
args: -n Bug24447 T1
max-time: 500
cmd: testNodeRestart
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