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
4a6cf9aa
Commit
4a6cf9aa
authored
Jun 23, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/home/jonas/src/mysql-4.1-ndb
parents
90b01f1c
1201a2e5
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1126 additions
and
279 deletions
+1126
-279
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+1
-2
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+62
-59
ndb/src/ndbapi/NdbApiSignal.cpp
ndb/src/ndbapi/NdbApiSignal.cpp
+1
-1
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+17
-0
ndb/test/include/HugoOperations.hpp
ndb/test/include/HugoOperations.hpp
+3
-44
ndb/test/ndbapi/testScan.cpp
ndb/test/ndbapi/testScan.cpp
+2
-49
ndb/test/ndbapi/testTimeout.cpp
ndb/test/ndbapi/testTimeout.cpp
+6
-4
ndb/test/ndbapi/testTransactions.cpp
ndb/test/ndbapi/testTransactions.cpp
+6
-3
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+767
-0
ndb/test/run-test/daily-devel-tests.txt
ndb/test/run-test/daily-devel-tests.txt
+236
-0
ndb/test/src/HugoOperations.cpp
ndb/test/src/HugoOperations.cpp
+25
-117
No files found.
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
View file @
4a6cf9aa
...
...
@@ -235,7 +235,6 @@ public:
enum
ReturnSignal
{
RS_NO_RETURN
=
0
,
RS_TCKEYCONF
=
1
,
RS_TCKEYREF
=
2
,
RS_TC_COMMITCONF
=
3
,
RS_TCROLLBACKCONF
=
4
,
RS_TCROLLBACKREP
=
5
...
...
@@ -699,7 +698,7 @@ public:
UintR
lqhkeyreqrec
;
AbortState
abortState
;
Uint32
buddyPtr
;
Uint8
unused
;
Uint8
m_exec_flag
;
Uint8
unused2
;
Uint8
takeOverRec
;
Uint8
currentReplicaNo
;
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
4a6cf9aa
...
...
@@ -1688,15 +1688,8 @@ Dbtc::TCKEY_abort(Signal* signal, int place)
case
59
:{
jam
();
const
TcKeyReq
*
const
tcKeyReq
=
(
TcKeyReq
*
)
&
signal
->
theData
[
0
];
const
Uint32
t1
=
tcKeyReq
->
transId1
;
const
Uint32
t2
=
tcKeyReq
->
transId2
;
signal
->
theData
[
0
]
=
apiConnectptr
.
p
->
ndbapiConnect
;
signal
->
theData
[
1
]
=
t1
;
signal
->
theData
[
2
]
=
t2
;
signal
->
theData
[
3
]
=
ZABORTINPROGRESS
;
sendSignal
(
apiConnectptr
.
p
->
ndbapiBlockref
,
GSN_TCROLLBACKREP
,
signal
,
4
,
JBB
);
terrorCode
=
ZABORTINPROGRESS
;
abortErrorLab
(
signal
);
return
;
}
...
...
@@ -2217,6 +2210,8 @@ void Dbtc::initApiConnectRec(Signal* signal,
UintR
Ttransid0
=
tcKeyReq
->
transId1
;
UintR
Ttransid1
=
tcKeyReq
->
transId2
;
regApiPtr
->
m_exec_flag
=
0
;
regApiPtr
->
returncode
=
0
;
regApiPtr
->
returnsignal
=
RS_TCKEYCONF
;
regApiPtr
->
firstTcConnect
=
RNIL
;
regApiPtr
->
lastTcConnect
=
RNIL
;
...
...
@@ -2382,6 +2377,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
bool
isIndexOp
=
regApiPtr
->
isIndexOp
;
bool
isIndexOpReturn
=
regApiPtr
->
indexOpReturn
;
regApiPtr
->
isIndexOp
=
false
;
// Reset marker
regApiPtr
->
m_exec_flag
|=
TexecFlag
;
switch
(
regApiPtr
->
apiConnectstate
)
{
case
CS_CONNECTED
:{
if
(
TstartFlag
==
1
&&
getAllowStartTransaction
()
==
true
){
...
...
@@ -2390,6 +2386,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
//---------------------------------------------------------------------
jam
();
initApiConnectRec
(
signal
,
regApiPtr
);
regApiPtr
->
m_exec_flag
=
TexecFlag
;
}
else
{
if
(
getAllowStartTransaction
()
==
true
){
/*------------------------------------------------------------------
...
...
@@ -2432,6 +2429,7 @@ void Dbtc::execTCKEYREQ(Signal* signal)
//--------------------------------------------------------------------
jam
();
initApiConnectRec
(
signal
,
regApiPtr
);
regApiPtr
->
m_exec_flag
=
TexecFlag
;
}
else
if
(
TexecFlag
)
{
TCKEY_abort
(
signal
,
59
);
return
;
...
...
@@ -5101,8 +5099,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal)
// We will abort it instead.
/*******************************************************************/
regApiPtr
->
returnsignal
=
RS_NO_RETURN
;
abort010Lab
(
signal
);
errorCode
=
ZTRANS_STATUS_ERROR
;
abort010Lab
(
signal
);
}
//if
}
else
{
jam
();
...
...
@@ -5128,8 +5126,8 @@ void Dbtc::execTC_COMMITREQ(Signal* signal)
// transaction. We will abort it instead.
/***********************************************************************/
regApiPtr
->
returnsignal
=
RS_NO_RETURN
;
abort010Lab
(
signal
);
errorCode
=
ZPREPAREINPROGRESS
;
abort010Lab
(
signal
);
break
;
case
CS_START_COMMITTING
:
...
...
@@ -5661,7 +5659,10 @@ void Dbtc::abortErrorLab(Signal* signal)
return
;
}
transP
->
returnsignal
=
RS_TCROLLBACKREP
;
transP
->
returncode
=
terrorCode
;
if
(
transP
->
returncode
==
0
){
jam
();
transP
->
returncode
=
terrorCode
;
}
abort010Lab
(
signal
);
}
//Dbtc::abortErrorLab()
...
...
@@ -5989,7 +5990,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
/* FIND OUT WHAT WE NEED TO DO BASED ON THE STATE INFORMATION.*/
/*------------------------------------------------------------------*/
DEBUG
(
"Time-out in state = "
<<
apiConnectptr
.
p
->
apiConnectstate
<<
" apiConnectptr.i = "
<<
apiConnectptr
.
i
);
<<
" apiConnectptr.i = "
<<
apiConnectptr
.
i
<<
" - exec: "
<<
apiConnectptr
.
p
->
m_exec_flag
);
switch
(
apiConnectptr
.
p
->
apiConnectstate
)
{
case
CS_STARTED
:
if
(
apiConnectptr
.
p
->
lqhkeyreqrec
==
apiConnectptr
.
p
->
lqhkeyconfrec
){
...
...
@@ -6003,11 +6005,8 @@ void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr)
jam
();
return
;
}
//if
apiConnectptr
.
p
->
returnsignal
=
RS_NO_RETURN
;
}
else
{
jam
();
apiConnectptr
.
p
->
returnsignal
=
RS_TCROLLBACKREP
;
}
apiConnectptr
.
p
->
returnsignal
=
RS_TCROLLBACKREP
;
apiConnectptr
.
p
->
returncode
=
ZTIME_OUT_ERROR
;
abort010Lab
(
signal
);
return
;
...
...
@@ -9385,9 +9384,9 @@ Dbtc::close_scan_req_send_conf(Signal* signal, ScanRecordPtr scanPtr){
return
;
}
if
(
!
apiFail
){
Uint32
ref
=
apiConnectptr
.
p
->
ndbapiBlockref
;
if
(
!
apiFail
&&
ref
){
jam
();
Uint32
ref
=
apiConnectptr
.
p
->
ndbapiBlockref
;
ScanTabConf
*
conf
=
(
ScanTabConf
*
)
&
signal
->
theData
[
0
];
conf
->
apiConnectPtr
=
apiConnectptr
.
p
->
ndbapiConnect
;
conf
->
requestInfo
=
ScanTabConf
::
EndOfData
;
...
...
@@ -9395,7 +9394,7 @@ Dbtc::close_scan_req_send_conf(Signal* signal, ScanRecordPtr scanPtr){
conf
->
transId2
=
apiConnectptr
.
p
->
transid
[
1
];
sendSignal
(
ref
,
GSN_SCAN_TABCONF
,
signal
,
ScanTabConf
::
SignalLength
,
JBB
);
}
releaseScanResources
(
scanPtr
);
if
(
apiFail
){
...
...
@@ -9926,48 +9925,52 @@ void Dbtc::releaseAbortResources(Signal* signal)
apiConnectptr
.
p
->
apiConnectstate
=
CS_ABORTING
;
apiConnectptr
.
p
->
abortState
=
AS_IDLE
;
bool
ok
=
false
;
Uint32
blockRef
=
apiConnectptr
.
p
->
ndbapiBlockref
;
switch
(
apiConnectptr
.
p
->
returnsignal
){
case
RS_TCROLLBACKCONF
:
jam
();
ok
=
true
;
signal
->
theData
[
0
]
=
apiConnectptr
.
p
->
ndbapiConnect
;
signal
->
theData
[
1
]
=
apiConnectptr
.
p
->
transid
[
0
];
signal
->
theData
[
2
]
=
apiConnectptr
.
p
->
transid
[
1
];
sendSignal
(
blockRef
,
GSN_TCROLLBACKCONF
,
signal
,
3
,
JBB
);
break
;
case
RS_TCROLLBACKREP
:{
jam
();
ok
=
true
;
TcRollbackRep
*
const
tcRollbackRep
=
(
TcRollbackRep
*
)
signal
->
getDataPtr
();
tcRollbackRep
->
connectPtr
=
apiConnectptr
.
p
->
ndbapiConnect
;
tcRollbackRep
->
transId
[
0
]
=
apiConnectptr
.
p
->
transid
[
0
];
tcRollbackRep
->
transId
[
1
]
=
apiConnectptr
.
p
->
transid
[
1
];
tcRollbackRep
->
returnCode
=
apiConnectptr
.
p
->
returncode
;
sendSignal
(
blockRef
,
GSN_TCROLLBACKREP
,
signal
,
TcRollbackRep
::
SignalLength
,
JBB
);
}
break
;
case
RS_NO_RETURN
:
if
(
apiConnectptr
.
p
->
m_exec_flag
||
apiConnectptr
.
p
->
apiFailState
==
ZTRUE
){
jam
();
ok
=
true
;
break
;
case
RS_TCKEYCONF
:
case
RS_TCKEYREF
:
case
RS_TC_COMMITCONF
:
break
;
}
if
(
!
ok
){
jam
();
ndbout_c
(
"returnsignal = %d"
,
apiConnectptr
.
p
->
returnsignal
);
sendSystemError
(
signal
);
}
//if
bool
ok
=
false
;
Uint32
blockRef
=
apiConnectptr
.
p
->
ndbapiBlockref
;
ReturnSignal
ret
=
apiConnectptr
.
p
->
returnsignal
;
apiConnectptr
.
p
->
returnsignal
=
RS_NO_RETURN
;
apiConnectptr
.
p
->
m_exec_flag
=
0
;
switch
(
ret
){
case
RS_TCROLLBACKCONF
:
jam
();
ok
=
true
;
signal
->
theData
[
0
]
=
apiConnectptr
.
p
->
ndbapiConnect
;
signal
->
theData
[
1
]
=
apiConnectptr
.
p
->
transid
[
0
];
signal
->
theData
[
2
]
=
apiConnectptr
.
p
->
transid
[
1
];
sendSignal
(
blockRef
,
GSN_TCROLLBACKCONF
,
signal
,
3
,
JBB
);
break
;
case
RS_TCROLLBACKREP
:{
jam
();
ok
=
true
;
TcRollbackRep
*
const
tcRollbackRep
=
(
TcRollbackRep
*
)
signal
->
getDataPtr
();
tcRollbackRep
->
connectPtr
=
apiConnectptr
.
p
->
ndbapiConnect
;
tcRollbackRep
->
transId
[
0
]
=
apiConnectptr
.
p
->
transid
[
0
];
tcRollbackRep
->
transId
[
1
]
=
apiConnectptr
.
p
->
transid
[
1
];
tcRollbackRep
->
returnCode
=
apiConnectptr
.
p
->
returncode
;
sendSignal
(
blockRef
,
GSN_TCROLLBACKREP
,
signal
,
TcRollbackRep
::
SignalLength
,
JBB
);
}
break
;
case
RS_NO_RETURN
:
jam
();
ok
=
true
;
break
;
case
RS_TCKEYCONF
:
case
RS_TC_COMMITCONF
:
break
;
}
if
(
!
ok
){
jam
();
ndbout_c
(
"returnsignal = %d"
,
apiConnectptr
.
p
->
returnsignal
);
sendSystemError
(
signal
);
}
//if
}
setApiConTimer
(
apiConnectptr
.
i
,
0
,
__LINE__
);
apiConnectptr
.
p
->
abortState
=
AS_IDLE
;
if
(
apiConnectptr
.
p
->
apiFailState
==
ZTRUE
)
{
jam
();
handleApiFailState
(
signal
,
apiConnectptr
.
i
);
...
...
ndb/src/ndbapi/NdbApiSignal.cpp
View file @
4a6cf9aa
...
...
@@ -162,7 +162,7 @@ NdbApiSignal::setSignal(int aNdbSignalType)
theTrace
=
TestOrd
::
TraceAPI
;
theReceiversBlockNumber
=
DBTC
;
theVerId_signalNumber
=
GSN_TCROLLBACKREQ
;
theLength
=
5
;
theLength
=
3
;
}
break
;
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
4a6cf9aa
...
...
@@ -665,6 +665,23 @@ void NdbScanOperation::closeScan()
break
;
}
while
(
m_sent_receivers_count
){
theNdb
->
theWaiter
.
m_node
=
nodeId
;
theNdb
->
theWaiter
.
m_state
=
WAIT_SCAN
;
int
return_code
=
theNdb
->
receiveResponse
(
WAITFOR_SCAN_TIMEOUT
);
switch
(
return_code
){
case
0
:
break
;
case
-
1
:
setErrorCode
(
4008
);
case
-
2
:
m_api_receivers_count
=
0
;
m_conf_receivers_count
=
0
;
m_sent_receivers_count
=
0
;
theNdbCon
->
theReleaseOnClose
=
true
;
}
}
if
(
m_api_receivers_count
+
m_conf_receivers_count
){
// Send close scan
send_next_scan
(
0
,
true
);
// Close scan
...
...
ndb/test/include/HugoOperations.hpp
View file @
4a6cf9aa
...
...
@@ -57,11 +57,10 @@ public:
int
pkDeleteRecord
(
Ndb
*
,
int
recordNo
,
int
numRecords
=
1
);
int
scanReadRecords
(
Ndb
*
pNdb
,
Uint32
parallelism
=
240
,
ScanLock
lock
=
SL_Read
);
int
executeScanRead
(
Ndb
*
);
NdbResultSet
*
scanReadRecords
(
Ndb
*
pNdb
,
ScanLock
lock
=
SL_Read
);
int
readTuples
(
NdbResultSet
*
);
int
execute_Commit
(
Ndb
*
,
AbortOption
ao
=
AbortOnError
);
int
execute_NoCommit
(
Ndb
*
,
...
...
@@ -104,46 +103,6 @@ protected:
Vector
<
BaseString
>
savedRecords
;
private:
NdbConnection
*
pTrans
;
struct
ScanTmp
{
ScanTmp
()
{
pTrans
=
0
;
m_tmpRow
=
0
;
m_delete
=
true
;
m_op
=
DONE
;
}
ScanTmp
(
NdbConnection
*
a
,
NDBT_ResultRow
*
b
){
pTrans
=
a
;
m_tmpRow
=
b
;
m_delete
=
true
;
m_op
=
DONE
;
}
ScanTmp
(
const
ScanTmp
&
org
){
*
this
=
org
;
}
ScanTmp
&
operator
=
(
const
ScanTmp
&
org
){
pTrans
=
org
.
pTrans
;
m_tmpRow
=
org
.
m_tmpRow
;
m_delete
=
org
.
m_delete
;
m_op
=
org
.
m_op
;
return
*
this
;
}
~
ScanTmp
()
{
if
(
m_delete
&&
pTrans
)
pTrans
->
close
();
if
(
m_delete
&&
m_tmpRow
)
delete
m_tmpRow
;
}
NdbConnection
*
pTrans
;
NDBT_ResultRow
*
m_tmpRow
;
bool
m_delete
;
enum
{
DONE
,
READ
,
UPDATE
,
DELETE
}
m_op
;
};
Vector
<
ScanTmp
>
m_scans
;
int
run
(
ScanTmp
&
tmp
);
};
#endif
ndb/test/ndbapi/testScan.cpp
View file @
4a6cf9aa
...
...
@@ -809,58 +809,11 @@ int runExecuteScanWithoutOpenScan(NDBT_Context* ctx, NDBT_Step* step){
}
int
runOnlyOneOpBeforeOpenScan
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
int
records
=
ctx
->
getNumRecords
();
int
numFailed
=
0
;
ScanFunctions
scanF
(
*
pTab
);
if
(
scanF
.
scanReadFunctions
(
GETNDB
(
step
),
records
,
6
,
ScanFunctions
::
OnlyOneOpBeforeOpenScan
,
false
)
==
0
){
numFailed
++
;
}
if
(
scanF
.
scanReadFunctions
(
GETNDB
(
step
),
records
,
6
,
ScanFunctions
::
OnlyOneOpBeforeOpenScan
,
true
)
==
0
){
numFailed
++
;
}
if
(
numFailed
>
0
)
return
NDBT_FAILED
;
else
return
NDBT_OK
;
}
int
runOnlyOneScanPerTrans
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
int
records
=
ctx
->
getNumRecords
();
int
numFailed
=
0
;
ScanFunctions
scanF
(
*
pTab
);
if
(
scanF
.
scanReadFunctions
(
GETNDB
(
step
),
records
,
6
,
ScanFunctions
::
OnlyOneScanPerTrans
,
false
)
==
0
){
numFailed
++
;
}
if
(
scanF
.
scanReadFunctions
(
GETNDB
(
step
),
records
,
6
,
ScanFunctions
::
OnlyOneScanPerTrans
,
true
)
==
0
){
numFailed
++
;
}
if
(
numFailed
>
0
)
return
NDBT_FAILED
;
else
return
NDBT_OK
;
int
runOnlyOneScanPerTrans
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
return
NDBT_OK
;
}
int
runNoCloseTransaction
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
...
...
ndb/test/ndbapi/testTimeout.cpp
View file @
4a6cf9aa
...
...
@@ -206,7 +206,7 @@ int runTimeoutTrans2(NDBT_Context* ctx, NDBT_Step* step){
// Expect that transaction has timed-out
res
=
hugoOps
.
execute_Commit
(
pNdb
);
if
(
op1
!=
0
&&
res
!=
2
37
){
if
(
op1
!=
0
&&
res
!=
2
66
){
g_err
<<
stepNo
<<
": Fail: "
<<
res
<<
"!= 237, op1="
<<
op1
<<
", op2="
<<
op2
<<
endl
;
return
NDBT_FAILED
;
...
...
@@ -299,9 +299,11 @@ int runBuddyTransNoTimeout(NDBT_Context* ctx, NDBT_Step* step){
for
(
int
i
=
0
;
i
<
10
;
i
++
){
// Perform buddy scan reads
CHECK
(
hugoOps
.
scanReadRecords
(
pNdb
)
==
0
);
CHECK
(
hugoOps
.
executeScanRead
(
pNdb
)
==
0
);
NdbResultSet
*
rs
=
0
;
CHECK
((
rs
=
hugoOps
.
scanReadRecords
(
pNdb
))
!=
0
);
CHECK
(
hugoOps
.
execute_NoCommit
(
pNdb
)
==
0
);
CHECK
(
hugoOps
.
readTuples
(
rs
)
==
0
);
int
sleep
=
myRandom48
(
maxSleep
);
ndbout
<<
"Sleeping for "
<<
sleep
<<
" milliseconds"
<<
endl
;
NdbSleep_MilliSleep
(
sleep
);
...
...
ndb/test/ndbapi/testTransactions.cpp
View file @
4a6cf9aa
...
...
@@ -204,11 +204,14 @@ runOp(HugoOperations & hugoOps,
}
else
if
(
strcmp
(
op
,
"DELETE"
)
==
0
){
C2
(
hugoOps
.
pkDeleteRecord
(
pNdb
,
1
,
1
)
==
0
);
}
else
if
(
strcmp
(
op
,
"SCAN"
)
==
0
){
C2
(
hugoOps
.
scanReadRecords
(
pNdb
)
==
0
);
abort
();
//C2(hugoOps.scanReadRecords(pNdb) == 0);
}
else
if
(
strcmp
(
op
,
"SCAN-HL"
)
==
0
){
C2
(
hugoOps
.
scanReadRecords
(
pNdb
,
240
,
HugoOperations
::
SL_ReadHold
)
==
0
);
abort
();
//C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_ReadHold)== 0);
}
else
if
(
strcmp
(
op
,
"SCAN-EX"
)
==
0
){
C2
(
hugoOps
.
scanReadRecords
(
pNdb
,
240
,
HugoOperations
::
SL_Exclusive
)
==
0
);
abort
();
//C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_Exclusive)== 0);
}
else
{
g_err
<<
__FILE__
<<
" - "
<<
__LINE__
<<
": Unknown operation"
<<
op
<<
endl
;
...
...
ndb/test/run-test/daily-basic-tests.txt
0 → 100644
View file @
4a6cf9aa
This diff is collapsed.
Click to expand it.
ndb/test/run-test/daily-devel-tests.txt
0 → 100644
View file @
4a6cf9aa
#
# INDEX
#
max-time: 1500
cmd: testIndex
args: -n CreateAll
#-m 7200 1: testIndex -n InsertDeleteGentle T7
max-time: 3600
cmd: testIndex
args: -n InsertDelete T1 T10
#-m 3600 1: testIndex -n CreateLoadDropGentle T7
max-time: 3600
cmd: testIndex
args: -n CreateLoadDrop T1 T10
#
# BACKUP
#
max-time: 600
cmd: testBackup
args: -n BackupOne
max-time: 600
cmd: testBackup
args: -n BackupBank T6
#
# MGMAPI AND MGSRV
#
max-time: 1800
cmd: testMgm
args: -n SingleUserMode T1
#
#
# SYSTEM RESTARTS
#
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T1
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T6
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T7
max-time: 1500
cmd: testSystemRestart
args: -n SR1 T8
max-time: 1500
cmd: testSystemRestart
args: -n SR2 T1
max-time: 1500
cmd: testSystemRestart
args: -n SR2 T6
max-time: 1500
cmd: testSystemRestart
args: -n SR2 T7
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T1
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T6
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T7
max-time: 1500
cmd: testSystemRestart
args: -n SR_UNDO T8
max-time: 1500
cmd: testSystemRestart
args: -n SR3 T6
max-time: 1500
cmd: testSystemRestart
args: -n SR4 T6
#
max-time: 1500
cmd: testSystemRestart
args: -n SR_FULLDB T1
#
# NODE RESTARTS
#
max-time: 2500
cmd: testNodeRestart
args: -n NoLoad T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n PkRead T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -l 1 -n PkReadPkUpdate
max-time: 2500
cmd: testNodeRestart
args: -l 1 -n ReadUpdateScan
max-time: 2500
cmd: testNodeRestart
args: -n Terror T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n FullDb T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartRandomNode T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartRandomNodeError T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartRandomNodeInitial T6 T13
max-time: 3600
cmd: testNodeRestart
args: -l 1 -n RestartNFDuringNR T6 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartMasterNodeError T6 T8 T13
max-time: 3600
cmd: testNodeRestart
args: -n RestartNodeDuringLCP T6
max-time: 2500
cmd: testNodeRestart
args: -n TwoNodeFailure T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n TwoMasterNodeFailure T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n FiftyPercentFail T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartAllNodes T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartAllNodesAbort T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n RestartAllNodesError9999 T6 T8 T13
max-time: 2500
cmd: testNodeRestart
args: -n FiftyPercentStopAndWait T6 T8 T13
max-time: 500
cmd: testNodeRestart
args: -n StopOnError T1
#
max-time: 2500
cmd: testIndex
args: -n NFNR1 T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR2 T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR3 T6 T13
max-time: 2500
cmd: testIndex
args: -n BuildDuring T6
max-time: 2500
cmd: testIndex
args: -l 2 -n SR1 T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR1_O T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR2_O T6 T13
max-time: 2500
cmd: testIndex
args: -n NFNR3_O T6 T13
max-time: 2500
cmd: testIndex
args: -n BuildDuring_O T6
max-time: 2500
cmd: testIndex
args: -l 2 -n SR1_O T6 T13
max-time: 500
cmd: testIndex
args: -n MixedTransaction T1
max-time: 2500
cmd: testDict
args: -n NF1 T1 T6 T13
max-time: 2500
cmd: test_event
args: -n BasicEventOperation T1 T6
max-time: 2500
cmd: testOIBasic
args:
ndb/test/src/HugoOperations.cpp
View file @
4a6cf9aa
...
...
@@ -292,91 +292,61 @@ int HugoOperations::pkDeleteRecord(Ndb* pNdb,
return
NDBT_OK
;
}
int
HugoOperations
::
scanReadRecords
(
Ndb
*
pNdb
,
Uint32
parallelism
,
ScanLock
lock
){
#ifdef JONAS_NOT_DONE
NdbConnection
*
pCon
=
pNdb
->
hupp
(
pTrans
);
NdbResultSet
*
HugoOperations
::
scanReadRecords
(
Ndb
*
pNdb
,
ScanLock
lock
){
NDBT_ResultRow
*
m_tmpRow
=
new
NDBT_ResultRow
(
tab
);
ScanTmp
tmp
(
pCon
,
m_tmpRow
);
tmp
.
m_op
=
ScanTmp
::
READ
;
Ndb
Operation
*
pOp
=
pCon
->
getNdb
Operation
(
tab
.
getName
());
Ndb
ScanOperation
*
pOp
=
pTrans
->
getNdbScan
Operation
(
tab
.
getName
());
if
(
pOp
==
NULL
)
{
ERR
(
p
Con
->
getNdbError
());
return
NDBT_FAILED
;
ERR
(
p
Trans
->
getNdbError
());
return
0
;
}
int
check
=
0
;
NdbResultSet
*
rs
=
0
;
switch
(
lock
){
case
SL_ReadHold
:
check
=
pOp
->
openScanReadHoldLock
(
parallelism
);
rs
=
pOp
->
readTuples
(
NdbScanOperation
::
LM_Read
,
1
,
1
);
break
;
case
SL_Exclusive
:
check
=
pOp
->
openScanExclusive
(
parallelism
);
rs
=
pOp
->
readTuples
(
NdbScanOperation
::
LM_Exclusive
,
1
,
1
);
break
;
case
SL_Read
:
default:
check
=
pOp
->
openScanRead
(
parallelism
);
rs
=
pOp
->
readTuples
(
NdbScanOperation
::
LM_Dirty
,
1
,
1
);
}
if
(
check
==
-
1
)
{
ERR
(
p
Con
->
getNdbError
());
return
NDBT_FAILED
;
if
(
rs
==
0
)
{
ERR
(
p
Trans
->
getNdbError
());
return
0
;
}
check
=
pOp
->
interpret_exit_ok
();
if
(
check
==
-
1
)
{
ERR
(
p
Con
->
getNdbError
());
return
NDBT_FAILED
;
ERR
(
p
Trans
->
getNdbError
());
return
0
;
}
// Define attributes to read
for
(
int
a
=
0
;
a
<
tab
.
getNoOfColumns
();
a
++
){
if
((
m_tmpRow
->
attributeStore
(
a
)
=
pOp
->
getValue
(
tab
.
getColumn
(
a
)
->
getName
()))
==
0
)
{
ERR
(
p
Con
->
getNdbError
());
return
NDBT_FAILED
;
ERR
(
p
Trans
->
getNdbError
());
return
0
;
}
}
check
=
tmp
.
pTrans
->
executeScan
();
if
(
check
==
-
1
)
{
NdbError
err
=
tmp
.
pTrans
->
getNdbError
();
ERR
(
err
);
return
err
.
code
;
}
tmp
.
m_delete
=
false
;
m_scans
.
push_back
(
tmp
);
return
0
;
#endif
return
rs
;
}
int
HugoOperations
::
executeScanRead
(
Ndb
*
pNdb
){
int
check
=
0
;
for
(
Uint32
i
=
0
;
i
<
m_scans
.
size
();
i
++
){
ScanTmp
&
tmp
=
m_scans
[
i
];
check
=
run
(
tmp
);
if
(
check
!=
0
){
return
check
;
}
}
while
(
m_scans
.
size
()
>
0
){
ScanTmp
&
tmp
=
m_scans
[
m_scans
.
size
()
-
1
];
if
(
tmp
.
m_op
!=
ScanTmp
::
DONE
)
abort
();
tmp
.
pTrans
->
close
();
delete
tmp
.
m_tmpRow
;
m_scans
.
erase
(
m_scans
.
size
()
-
1
);
}
if
(
check
!=
0
){
return
check
;
int
HugoOperations
::
readTuples
(
NdbResultSet
*
rs
){
int
res
=
0
;
while
((
res
=
rs
->
nextResult
())
==
0
){
}
if
(
res
!=
1
)
return
NDBT_FAILED
;
return
NDBT_OK
;
}
...
...
@@ -384,19 +354,6 @@ int HugoOperations::execute_Commit(Ndb* pNdb,
AbortOption
eao
){
int
check
=
0
;
while
(
m_scans
.
size
()
>
0
){
ScanTmp
&
tmp
=
m_scans
[
m_scans
.
size
()
-
1
];
if
(
tmp
.
m_op
!=
ScanTmp
::
DONE
)
abort
();
tmp
.
pTrans
->
close
();
delete
tmp
.
m_tmpRow
;
m_scans
.
erase
(
m_scans
.
size
()
-
1
);
}
if
(
check
!=
0
){
return
check
;
}
check
=
pTrans
->
execute
(
Commit
,
eao
);
if
(
check
==
-
1
)
{
...
...
@@ -414,54 +371,9 @@ int HugoOperations::execute_Commit(Ndb* pNdb,
return
NDBT_OK
;
}
int
HugoOperations
::
run
(
ScanTmp
&
tmp
){
#if JONAS_NOT_DONE
int
count
=
0
;
if
(
tmp
.
m_op
==
ScanTmp
::
DONE
)
abort
();
int
eof
=
tmp
.
pTrans
->
nextScanResult
(
true
)
;
while
(
eof
==
0
){
count
++
;
switch
(
tmp
.
m_op
){
case
ScanTmp
:
:
READ
:
case
ScanTmp
:
:
UPDATE
:
case
ScanTmp
:
:
DELETE
:
break
;
case
ScanTmp
:
:
DONE
:
abort
();
}
rows
.
push_back
(
tmp
.
m_tmpRow
->
clone
());
eof
=
tmp
.
pTrans
->
nextScanResult
(
false
);
}
tmp
.
m_op
=
ScanTmp
::
DONE
;
if
(
eof
==
-
1
)
{
deallocRows
();
NdbError
err
=
tmp
.
pTrans
->
getNdbError
();
ERR
(
err
);
return
err
.
code
;
}
if
(
count
==
0
)
return
626
;
#endif
return
0
;
}
int
HugoOperations
::
execute_NoCommit
(
Ndb
*
pNdb
,
AbortOption
eao
){
int
check
;
for
(
Uint32
i
=
0
;
i
<
m_scans
.
size
();
i
++
){
ScanTmp
&
tmp
=
m_scans
[
i
];
check
=
run
(
tmp
);
if
(
check
!=
0
){
return
check
;
}
}
check
=
pTrans
->
execute
(
NoCommit
,
eao
);
if
(
check
==
-
1
)
{
...
...
@@ -701,10 +613,6 @@ HugoOperations::refresh() {
NdbConnection
*
t
=
getTransaction
();
if
(
t
)
t
->
refresh
();
for
(
Uint32
i
=
0
;
i
<
m_scans
.
size
();
i
++
){
if
(
m_scans
[
i
].
pTrans
)
m_scans
[
i
].
pTrans
->
refresh
();
}
}
int
HugoOperations
::
indexReadRecords
(
Ndb
*
,
const
char
*
idxName
,
int
recordNo
,
...
...
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