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
4fa12fc2
Commit
4fa12fc2
authored
Oct 10, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
parents
3e852dfb
6ef83b2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
1 deletion
+72
-1
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+23
-0
ndb/test/ndbapi/testTimeout.cpp
ndb/test/ndbapi/testTimeout.cpp
+49
-1
No files found.
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
4fa12fc2
...
@@ -6305,6 +6305,18 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr, Uint32 errCode)
...
@@ -6305,6 +6305,18 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr, Uint32 errCode)
break
;
break
;
case
CS_START_SCAN
:{
case
CS_START_SCAN
:{
jam
();
jam
();
/*
We are waiting for application to continue the transaction. In this
particular state we will use the application timeout parameter rather
than the shorter Deadlock detection timeout.
*/
if
(
c_appl_timeout_value
==
0
||
(
ctcTimer
-
getApiConTimer
(
apiConnectptr
.
i
))
<=
c_appl_timeout_value
)
{
jam
();
return
;
}
//if
ScanRecordPtr
scanPtr
;
ScanRecordPtr
scanPtr
;
scanPtr
.
i
=
apiConnectptr
.
p
->
apiScanRec
;
scanPtr
.
i
=
apiConnectptr
.
p
->
apiScanRec
;
ptrCheckGuard
(
scanPtr
,
cscanrecFileSize
,
scanRecord
);
ptrCheckGuard
(
scanPtr
,
cscanrecFileSize
,
scanRecord
);
...
@@ -9825,6 +9837,17 @@ void Dbtc::sendScanTabConf(Signal* signal, ScanRecordPtr scanPtr) {
...
@@ -9825,6 +9837,17 @@ void Dbtc::sendScanTabConf(Signal* signal, ScanRecordPtr scanPtr) {
conf
->
requestInfo
=
op_count
|
ScanTabConf
::
EndOfData
;
conf
->
requestInfo
=
op_count
|
ScanTabConf
::
EndOfData
;
releaseScanResources
(
scanPtr
);
releaseScanResources
(
scanPtr
);
}
}
else
{
if
(
scanPtr
.
p
->
m_running_scan_frags
.
isEmpty
())
{
jam
();
/**
* All scan frags delivered...waiting for API
*/
setApiConTimer
(
apiConnectptr
.
i
,
ctcTimer
,
__LINE__
);
}
}
if
(
4
+
3
*
op_count
>
25
){
if
(
4
+
3
*
op_count
>
25
){
jam
();
jam
();
...
...
ndb/test/ndbapi/testTimeout.cpp
View file @
4fa12fc2
...
@@ -388,6 +388,45 @@ int runBuddyTransNoTimeout(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -388,6 +388,45 @@ int runBuddyTransNoTimeout(NDBT_Context* ctx, NDBT_Step* step){
return
result
;
return
result
;
}
}
int
runBuddyTransTimeout
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
int
stepNo
=
step
->
getStepNo
();
ndbout
<<
"TransactionInactiveTimeout="
<<
TIMEOUT
<<
endl
;
HugoOperations
hugoOps
(
*
ctx
->
getTab
());
Ndb
*
pNdb
=
GETNDB
(
step
);
for
(
int
l
=
1
;
l
<
loops
&&
result
==
NDBT_OK
;
l
++
){
NdbTransaction
*
pTrans
=
0
;
do
{
pTrans
=
pNdb
->
startTransaction
();
NdbScanOperation
*
pOp
=
pTrans
->
getNdbScanOperation
(
ctx
->
getTab
());
CHECK
(
pOp
->
readTuples
(
NdbOperation
::
LM_Read
,
0
,
0
,
1
)
==
0
);
CHECK
(
pTrans
->
execute
(
NoCommit
)
==
0
);
int
sleep
=
2
*
TIMEOUT
;
ndbout
<<
"Sleeping for "
<<
sleep
<<
" milliseconds"
<<
endl
;
NdbSleep_MilliSleep
(
sleep
);
int
res
=
0
;
while
((
res
=
pOp
->
nextResult
())
==
0
);
ndbout_c
(
"res: %d"
,
res
);
CHECK
(
res
==
-
1
);
}
while
(
false
);
if
(
pTrans
)
{
pTrans
->
close
();
}
}
return
result
;
}
int
int
runError4012
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
runError4012
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
result
=
NDBT_OK
;
...
@@ -495,6 +534,15 @@ TESTCASE("BuddyTransNoTimeout5",
...
@@ -495,6 +534,15 @@ TESTCASE("BuddyTransNoTimeout5",
FINALIZER
(
resetTransactionTimeout
);
FINALIZER
(
resetTransactionTimeout
);
FINALIZER
(
runClearTable
);
FINALIZER
(
runClearTable
);
}
}
TESTCASE
(
"BuddyTransTimeout1"
,
"Start a scan and check that it gets aborted"
){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
setTransactionTimeout
);
STEPS
(
runBuddyTransTimeout
,
1
);
FINALIZER
(
resetTransactionTimeout
);
FINALIZER
(
runClearTable
);
}
#if 0
TESTCASE("Error4012", ""){
TESTCASE("Error4012", ""){
TC_PROPERTY("TransactionDeadlockTimeout", 120000);
TC_PROPERTY("TransactionDeadlockTimeout", 120000);
INITIALIZER(runLoadTable);
INITIALIZER(runLoadTable);
...
@@ -503,7 +551,7 @@ TESTCASE("Error4012", ""){
...
@@ -503,7 +551,7 @@ TESTCASE("Error4012", ""){
STEPS(runError4012, 2);
STEPS(runError4012, 2);
FINALIZER(runClearTable);
FINALIZER(runClearTable);
}
}
#endif
NDBT_TESTSUITE_END
(
testTimeout
);
NDBT_TESTSUITE_END
(
testTimeout
);
int
main
(
int
argc
,
const
char
**
argv
){
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