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
2462bc62
Commit
2462bc62
authored
Feb 06, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug8262 - ndb
crash if scan is poped from queue before all attrinfo has arrived
parent
7fba2bf3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
8 deletions
+49
-8
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+14
-5
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+4
-0
ndb/test/ndbapi/testScan.cpp
ndb/test/ndbapi/testScan.cpp
+27
-3
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/dblqh/DblqhMain.cpp
View file @
2462bc62
...
@@ -8719,13 +8719,14 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8719,13 +8719,14 @@ void Dblqh::finishScanrec(Signal* signal)
return
;
return
;
}
}
ndbrequire
(
restart
.
p
->
scanState
==
ScanRecord
::
IN_QUEUE
);
ScanRecordPtr
tmpScan
=
scanptr
;
ScanRecordPtr
tmpScan
=
scanptr
;
TcConnectionrecPtr
tmpTc
=
tcConnectptr
;
TcConnectionrecPtr
tmpTc
=
tcConnectptr
;
tcConnectptr
.
i
=
restart
.
p
->
scanTcrec
;
tcConnectptr
.
i
=
restart
.
p
->
scanTcrec
;
ptrCheckGuard
(
tcConnectptr
,
ctcConnectrecFileSize
,
tcConnectionrec
);
ptrCheckGuard
(
tcConnectptr
,
ctcConnectrecFileSize
,
tcConnectionrec
);
restart
.
p
->
scanNumber
=
scanNumber
;
restart
.
p
->
scanNumber
=
scanNumber
;
restart
.
p
->
scanState
=
ScanRecord
::
WAIT_ACC_SCAN
;
queue
.
remove
(
restart
);
queue
.
remove
(
restart
);
scans
.
add
(
restart
);
scans
.
add
(
restart
);
...
@@ -8741,9 +8742,17 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8741,9 +8742,17 @@ void Dblqh::finishScanrec(Signal* signal)
#endif
#endif
}
}
restart
.
p
->
scanState
=
ScanRecord
::
SCAN_FREE
;
// set in initScanRec
if
(
tcConnectptr
.
p
->
transactionState
==
TcConnectionrec
::
SCAN_STATE_USED
)
{
jam
();
scanptr
=
restart
;
scanptr
=
restart
;
continueAfterReceivingAllAiLab
(
signal
);
continueAfterReceivingAllAiLab
(
signal
);
}
else
{
ndbrequire
(
tcConnectptr
.
p
->
transactionState
==
TcConnectionrec
::
WAIT_SCAN_AI
);
}
scanptr
=
tmpScan
;
scanptr
=
tmpScan
;
tcConnectptr
=
tmpTc
;
tcConnectptr
=
tmpTc
;
}
//Dblqh::finishScanrec()
}
//Dblqh::finishScanrec()
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
2462bc62
...
@@ -9028,6 +9028,8 @@ void Dbtc::execDIGETPRIMCONF(Signal* signal)
...
@@ -9028,6 +9028,8 @@ void Dbtc::execDIGETPRIMCONF(Signal* signal)
scanFragptr
.
p
->
lqhBlockref
=
ref
;
scanFragptr
.
p
->
lqhBlockref
=
ref
;
scanFragptr
.
p
->
m_connectCount
=
getNodeInfo
(
tnodeid
).
m_connectCount
;
scanFragptr
.
p
->
m_connectCount
=
getNodeInfo
(
tnodeid
).
m_connectCount
;
sendScanFragReq
(
signal
,
scanptr
.
p
,
scanFragptr
.
p
);
sendScanFragReq
(
signal
,
scanptr
.
p
,
scanFragptr
.
p
);
if
(
ERROR_INSERTED
(
8035
))
globalTransporterRegistry
.
performSend
();
attrbufptr
.
i
=
cachePtr
.
p
->
firstAttrbuf
;
attrbufptr
.
i
=
cachePtr
.
p
->
firstAttrbuf
;
while
(
attrbufptr
.
i
!=
RNIL
)
{
while
(
attrbufptr
.
i
!=
RNIL
)
{
jam
();
jam
();
...
@@ -9037,6 +9039,8 @@ void Dbtc::execDIGETPRIMCONF(Signal* signal)
...
@@ -9037,6 +9039,8 @@ void Dbtc::execDIGETPRIMCONF(Signal* signal)
attrbufptr
.
p
,
attrbufptr
.
p
,
ref
);
ref
);
attrbufptr
.
i
=
attrbufptr
.
p
->
attrbuf
[
ZINBUF_NEXT
];
attrbufptr
.
i
=
attrbufptr
.
p
->
attrbuf
[
ZINBUF_NEXT
];
if
(
ERROR_INSERTED
(
8035
))
globalTransporterRegistry
.
performSend
();
}
//while
}
//while
scanFragptr
.
p
->
scanFragState
=
ScanFragRec
::
LQH_ACTIVE
;
scanFragptr
.
p
->
scanFragState
=
ScanFragRec
::
LQH_ACTIVE
;
scanFragptr
.
p
->
startFragTimer
(
ctcTimer
);
scanFragptr
.
p
->
startFragTimer
(
ctcTimer
);
...
...
ndb/test/ndbapi/testScan.cpp
View file @
2462bc62
...
@@ -35,7 +35,8 @@ getTable(Ndb* pNdb, int i){
...
@@ -35,7 +35,8 @@ getTable(Ndb* pNdb, int i){
int
runLoadTable
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
runLoadTable
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
records
=
ctx
->
getNumRecords
();
int
records
=
ctx
->
getProperty
(
"Rows"
,
ctx
->
getNumRecords
());
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
if
(
hugoTrans
.
loadTable
(
GETNDB
(
step
),
records
)
!=
0
){
if
(
hugoTrans
.
loadTable
(
GETNDB
(
step
),
records
)
!=
0
){
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -264,7 +265,7 @@ int runVerifyTable(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -264,7 +265,7 @@ int runVerifyTable(NDBT_Context* ctx, NDBT_Step* step){
int
runScanRead
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
runScanRead
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
loops
=
ctx
->
getNumLoops
();
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
get
NumRecords
(
);
int
records
=
ctx
->
get
Property
(
"Rows"
,
ctx
->
getNumRecords
()
);
int
parallelism
=
ctx
->
getProperty
(
"Parallelism"
,
240
);
int
parallelism
=
ctx
->
getProperty
(
"Parallelism"
,
240
);
int
abort
=
ctx
->
getProperty
(
"AbortProb"
,
5
);
int
abort
=
ctx
->
getProperty
(
"AbortProb"
,
5
);
...
@@ -376,6 +377,19 @@ int runScanReadError(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -376,6 +377,19 @@ int runScanReadError(NDBT_Context* ctx, NDBT_Step* step){
return
result
;
return
result
;
}
}
int
runInsertError
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
error
=
ctx
->
getProperty
(
"ErrorCode"
);
NdbRestarter
restarter
;
ctx
->
setProperty
(
"ErrorCode"
,
(
Uint32
)
0
);
if
(
restarter
.
insertErrorInAllNodes
(
error
)
!=
0
){
ndbout
<<
"Could not insert error in all nodes "
<<
endl
;
return
NDBT_FAILED
;
}
return
NDBT_OK
;
}
int
runScanReadErrorOneNode
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
runScanReadErrorOneNode
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
loops
=
ctx
->
getNumLoops
();
...
@@ -1221,6 +1235,16 @@ TESTCASE("ScanRead100",
...
@@ -1221,6 +1235,16 @@ TESTCASE("ScanRead100",
STEPS
(
runScanRead
,
100
);
STEPS
(
runScanRead
,
100
);
FINALIZER
(
runClearTable
);
FINALIZER
(
runClearTable
);
}
}
TESTCASE
(
"Scan-bug8262"
,
""
){
TC_PROPERTY
(
"Rows"
,
1
);
TC_PROPERTY
(
"ErrorCode"
,
8035
);
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runInsertError
);
// Will reset error code
STEPS
(
runScanRead
,
25
);
FINALIZER
(
runInsertError
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"ScanRead40RandomTable"
,
TESTCASE
(
"ScanRead40RandomTable"
,
"Verify scan requirement: Scan with 40 simultaneous threads. "
\
"Verify scan requirement: Scan with 40 simultaneous threads. "
\
"Use random table for the scan"
){
"Use random table for the scan"
){
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
2462bc62
...
@@ -378,6 +378,10 @@ max-time: 500
...
@@ -378,6 +378,10 @@ max-time: 500
cmd: testScan
cmd: testScan
args: -n ScanRestart T1
args: -n ScanRestart T1
max-time: 500
cmd: testScan
args: -l 100 -n Scan-bug8262 T7
# OLD FLEX
# OLD FLEX
max-time: 500
max-time: 500
cmd: flexBench
cmd: flexBench
...
...
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