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
035dcb8c
Commit
035dcb8c
authored
Dec 20, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug fixes for autotest
parent
652a2971
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
90 deletions
+8
-90
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+6
-4
ndb/src/ndbapi/Ndbif.cpp
ndb/src/ndbapi/Ndbif.cpp
+1
-0
ndb/test/ndbapi/testTimeout.cpp
ndb/test/ndbapi/testTimeout.cpp
+0
-60
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+1
-26
No files found.
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
035dcb8c
...
...
@@ -858,6 +858,8 @@ void Dbtup::sendTUPKEYCONF(Signal* signal,
return
;
}
//Dbtup::sendTUPKEYCONF()
#define MAX_READ (sizeof(signal->theData) > MAX_MESSAGE_SIZE ? MAX_MESSAGE_SIZE : sizeof(signal->theData))
/* ---------------------------------------------------------------- */
/* ----------------------------- READ ---------------------------- */
/* ---------------------------------------------------------------- */
...
...
@@ -878,7 +880,7 @@ int Dbtup::handleReadReq(Signal* signal,
}
//if
Uint32
*
dst
=
&
signal
->
theData
[
25
];
Uint32
dstLen
=
(
sizeof
(
signal
->
theData
)
/
4
)
-
25
;
Uint32
dstLen
=
(
MAX_READ
/
4
)
-
25
;
const
Uint32
node
=
refToNode
(
sendBref
);
if
(
node
!=
0
&&
node
!=
getOwnNodeId
())
{
;
...
...
@@ -888,7 +890,7 @@ int Dbtup::handleReadReq(Signal* signal,
* execute direct
*/
dst
=
&
signal
->
theData
[
3
];
dstLen
=
(
sizeof
(
signal
->
theData
)
/
4
)
-
3
;
dstLen
=
(
MAX_READ
/
4
)
-
3
;
}
if
(
regOperPtr
->
interpretedExec
!=
1
)
{
...
...
@@ -1228,7 +1230,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
const
BlockReference
sendBref
=
regOperPtr
->
recBlockref
;
Uint32
*
dst
=
&
signal
->
theData
[
25
];
Uint32
dstLen
=
(
sizeof
(
signal
->
theData
)
/
4
)
-
25
;
Uint32
dstLen
=
(
MAX_READ
/
4
)
-
25
;
const
Uint32
node
=
refToNode
(
sendBref
);
if
(
node
!=
0
&&
node
!=
getOwnNodeId
())
{
;
...
...
@@ -1238,7 +1240,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
* execute direct
*/
dst
=
&
signal
->
theData
[
3
];
dstLen
=
(
sizeof
(
signal
->
theData
)
/
4
)
-
3
;
dstLen
=
(
MAX_READ
/
4
)
-
3
;
}
RtotalLen
=
RinitReadLen
;
...
...
ndb/src/ndbapi/Ndbif.cpp
View file @
035dcb8c
...
...
@@ -1128,6 +1128,7 @@ Ndb::sendPrepTrans(int forceSend)
a_con
->
theCommitStatus
=
NdbConnection
::
Aborted
;
}
//if
}
//if
a_con
->
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
a_con
->
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
a_con
->
handleExecuteCompletion
();
insert_completed_list
(
a_con
);
...
...
ndb/test/ndbapi/testTimeout.cpp
View file @
035dcb8c
...
...
@@ -87,45 +87,6 @@ int runClearTable(NDBT_Context* ctx, NDBT_Step* step){
result = NDBT_FAILED; \
break; }
int
runTimeoutTrans
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
NdbConfig
conf
(
GETNDB
(
step
)
->
getNodeId
()
+
1
);
unsigned
int
nodeId
=
conf
.
getMasterNodeId
();
int
stepNo
=
step
->
getStepNo
();
int
minSleep
=
(
int
)(
TIMEOUT
*
1.5
);
int
maxSleep
=
TIMEOUT
*
2
;
ndbout
<<
"TransactionInactiveTimeout="
<<
TIMEOUT
<<
", minSleep="
<<
minSleep
<<
", maxSleep="
<<
maxSleep
<<
endl
;
HugoOperations
hugoOps
(
*
ctx
->
getTab
());
Ndb
*
pNdb
=
GETNDB
(
step
);
for
(
int
l
=
0
;
l
<
loops
&&
result
==
NDBT_OK
;
l
++
){
do
{
// Commit transaction
CHECK
(
hugoOps
.
startTransaction
(
pNdb
)
==
0
);
CHECK
(
hugoOps
.
pkReadRecord
(
pNdb
,
stepNo
)
==
0
);
CHECK
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
int
sleep
=
minSleep
+
myRandom48
(
maxSleep
-
minSleep
);
ndbout
<<
"Sleeping for "
<<
sleep
<<
" milliseconds"
<<
endl
;
NdbSleep_MilliSleep
(
sleep
);
// Expect that transaction has timed-out
CHECK
(
hugoOps
.
execute_Commit
(
pNdb
)
==
237
);
}
while
(
false
);
hugoOps
.
closeTransaction
(
pNdb
);
}
return
result
;
}
int
runTimeoutTrans2
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
...
...
@@ -345,27 +306,6 @@ TESTCASE("DontTimeoutTransaction5",
FINALIZER
(
resetTransactionTimeout
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"TimeoutTransaction"
,
"Test that the transaction does timeout "
\
"if we sleep during the transaction. Use a sleep "
\
"value which is larger than TransactionInactiveTimeout"
){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
setTransactionTimeout
);
STEPS
(
runTimeoutTrans
,
1
);
FINALIZER
(
resetTransactionTimeout
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"TimeoutTransaction5"
,
"Test that the transaction does timeout "
\
"if we sleep during the transaction. Use a sleep "
\
"value which is larger than TransactionInactiveTimeout"
\
"Five simultaneous threads"
){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
setTransactionTimeout
);
STEPS
(
runTimeoutTrans
,
5
);
FINALIZER
(
resetTransactionTimeout
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"TimeoutRandTransaction"
,
"Test that the transaction does timeout "
\
"if we sleep during the transaction. Use a sleep "
\
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
035dcb8c
...
...
@@ -147,34 +147,9 @@ max-time: 500
cmd: testBasic
args: -n MassiveRollback2 T1 T6 T13
#-m 500 1: testBasic -n ReadConsistency T6
max-time: 500
cmd: testTimeout
args: -n DontTimeoutTransaction T1
max-time: 500
cmd: testTimeout
args: -n DontTimeoutTransaction5 T1
max-time: 500
cmd: testTimeout
args: -n TimeoutTransaction T1
max-time: 500
cmd: testTimeout
args: -n TimeoutTransaction5 T1
max-time: 500
cmd: testTimeout
args: -n BuddyTransNoTimeout T1
max-time: 500
cmd: testTimeout
args: -n BuddyTransNoTimeout5 T1
max-time: 500
cmd: testTimeout
args: -n TimeoutRandTransaction T1
args: T1
# SCAN TESTS
#
...
...
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