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
ad325516
Commit
ad325516
authored
Aug 09, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testTransaction -n FRead*
testTransaction -n *Scan* testTimeout -n *
parent
6f921472
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
414 additions
and
122 deletions
+414
-122
ndb/include/kernel/signaldata/DumpStateOrd.hpp
ndb/include/kernel/signaldata/DumpStateOrd.hpp
+1
-0
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+9
-2
ndb/test/include/HugoOperations.hpp
ndb/test/include/HugoOperations.hpp
+9
-4
ndb/test/ndbapi/testTimeout.cpp
ndb/test/ndbapi/testTimeout.cpp
+81
-67
ndb/test/ndbapi/testTransactions.cpp
ndb/test/ndbapi/testTransactions.cpp
+9
-12
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+208
-32
ndb/test/src/HugoOperations.cpp
ndb/test/src/HugoOperations.cpp
+93
-1
ndb/test/src/NDBT_Test.cpp
ndb/test/src/NDBT_Test.cpp
+4
-4
No files found.
ndb/include/kernel/signaldata/DumpStateOrd.hpp
View file @
ad325516
...
...
@@ -94,6 +94,7 @@ public:
TcDumpOneApiConnectRec
=
2505
,
TcDumpAllApiConnectRec
=
2506
,
TcSetTransactionTimeout
=
2507
,
TcSetApplTransactionTimeout
=
2508
,
CmvmiDumpConnections
=
2600
,
CmvmiDumpLongSignalMemory
=
2601
,
CmvmiSetRestartOnErrorInsert
=
2602
,
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
ad325516
...
...
@@ -5043,11 +5043,11 @@ void Dbtc::execLQHKEYREF(Signal* signal)
jam
();
diverify010Lab
(
signal
);
return
;
}
else
if
(
regApiPtr
->
tckeyrec
>
0
)
{
}
else
if
(
regApiPtr
->
tckeyrec
>
0
||
regApiPtr
->
m_exec_flag
)
{
jam
();
sendtckeyconf
(
signal
,
2
);
return
;
}
//if
}
}
//if
return
;
...
...
@@ -10533,6 +10533,13 @@ Dbtc::execDUMP_STATE_ORD(Signal* signal)
set_timeout_value
(
signal
->
theData
[
1
]);
}
}
if
(
dumpState
->
args
[
0
]
==
DumpStateOrd
::
TcSetApplTransactionTimeout
){
jam
();
if
(
signal
->
getLength
()
>
1
){
set_appl_timeout_value
(
signal
->
theData
[
1
]);
}
}
}
//Dbtc::execDUMP_STATE_ORD()
void
Dbtc
::
execSET_VAR_REQ
(
Signal
*
signal
)
...
...
ndb/test/include/HugoOperations.hpp
View file @
ad325516
...
...
@@ -58,9 +58,6 @@ public:
int
recordNo
,
int
numRecords
=
1
);
NdbResultSet
*
scanReadRecords
(
Ndb
*
pNdb
,
ScanLock
lock
=
SL_Read
);
int
readTuples
(
NdbResultSet
*
);
int
execute_Commit
(
Ndb
*
,
AbortOption
ao
=
AbortOnError
);
int
execute_NoCommit
(
Ndb
*
,
...
...
@@ -93,6 +90,10 @@ public:
int
numRecords
=
1
,
int
updatesValue
=
0
);
int
scanReadRecords
(
Ndb
*
,
NdbScanOperation
::
LockMode
=
NdbScanOperation
::
LM_CommittedRead
,
int
numRecords
=
1
);
protected:
void
allocRows
(
int
rows
);
void
deallocRows
();
...
...
@@ -101,6 +102,10 @@ protected:
HugoCalculator
calc
;
Vector
<
BaseString
>
savedRecords
;
struct
RsPair
{
NdbResultSet
*
m_result_set
;
int
records
;
};
Vector
<
RsPair
>
m_result_sets
;
Vector
<
RsPair
>
m_executed_result_sets
;
private:
NdbConnection
*
pTrans
;
};
...
...
ndb/test/ndbapi/testTimeout.cpp
View file @
ad325516
This diff is collapsed.
Click to expand it.
ndb/test/ndbapi/testTransactions.cpp
View file @
ad325516
...
...
@@ -102,7 +102,7 @@ OperationTestCase matrix[] = {
{
"ScanExInsert"
,
true
,
"SCAN-EX"
,
1
,
"INSERT"
,
266
,
X
,
0
,
1
},
{
"ScanExUpdate"
,
true
,
"SCAN-EX"
,
1
,
"UPDATE"
,
266
,
2
,
0
,
1
},
{
"ScanExDelete"
,
true
,
"SCAN-EX"
,
1
,
"DELETE"
,
266
,
X
,
0
,
1
},
{
"ScanExScan"
,
true
,
"SCAN-EX"
,
1
,
"SCAN"
,
274
,
X
,
0
,
1
},
{
"ScanExScan"
,
true
,
"SCAN-EX"
,
1
,
"SCAN"
,
0
,
1
,
0
,
1
},
{
"ScanExScanHl"
,
true
,
"SCAN-EX"
,
1
,
"SCAN-HL"
,
274
,
X
,
0
,
1
},
{
"ScanExScanEx"
,
true
,
"SCAN-EX"
,
1
,
"SCAN-EX"
,
274
,
X
,
0
,
1
},
#if 0
...
...
@@ -117,8 +117,8 @@ OperationTestCase matrix[] = {
{
"ReadExInsert"
,
true
,
"READ-EX"
,
1
,
"INSERT"
,
266
,
X
,
0
,
1
},
{
"ReadExUpdate"
,
true
,
"READ-EX"
,
1
,
"UPDATE"
,
266
,
X
,
0
,
1
},
{
"ReadExDelete"
,
true
,
"READ-EX"
,
1
,
"DELETE"
,
266
,
X
,
0
,
1
},
{
"ReadExScan"
,
true
,
"READ-EX"
,
1
,
"SCAN"
,
274
,
1
,
0
,
1
},
{
"ReadExScanHl"
,
true
,
"READ-EX"
,
1
,
"SCAN-HL"
,
274
,
1
,
0
,
1
},
{
"ReadExScan"
,
true
,
"READ-EX"
,
1
,
"SCAN"
,
0
,
1
,
0
,
1
},
{
"ReadExScanHl"
,
true
,
"READ-EX"
,
1
,
"SCAN-HL"
,
274
,
X
,
0
,
1
},
{
"ReadExScanEx"
,
true
,
"READ-EX"
,
1
,
"SCAN-EX"
,
274
,
X
,
0
,
1
},
#if 0
{ "ReadExScanUp", true, "READ-EX",1, "SCAN-UP", 266, X, 0, 1 },
...
...
@@ -132,7 +132,7 @@ OperationTestCase matrix[] = {
{
"InsertInsert"
,
false
,
"INSERT"
,
1
,
"INSERT"
,
266
,
X
,
0
,
1
},
{
"InsertUpdate"
,
false
,
"INSERT"
,
1
,
"UPDATE"
,
266
,
X
,
0
,
1
},
{
"InsertDelete"
,
false
,
"INSERT"
,
1
,
"DELETE"
,
266
,
X
,
0
,
1
},
{
"InsertScan"
,
false
,
"INSERT"
,
1
,
"SCAN"
,
274
,
X
,
0
,
1
},
{
"InsertScan"
,
false
,
"INSERT"
,
1
,
"SCAN"
,
626
,
X
,
0
,
1
},
{
"InsertScanHl"
,
false
,
"INSERT"
,
1
,
"SCAN-HL"
,
274
,
X
,
0
,
1
},
{
"InsertScanEx"
,
false
,
"INSERT"
,
1
,
"SCAN-EX"
,
274
,
X
,
0
,
1
},
#if 0
...
...
@@ -147,7 +147,7 @@ OperationTestCase matrix[] = {
{
"UpdateInsert"
,
true
,
"UPDATE"
,
2
,
"INSERT"
,
266
,
X
,
0
,
2
},
{
"UpdateUpdate"
,
true
,
"UPDATE"
,
2
,
"UPDATE"
,
266
,
X
,
0
,
2
},
{
"UpdateDelete"
,
true
,
"UPDATE"
,
2
,
"DELETE"
,
266
,
X
,
0
,
2
},
{
"UpdateScan"
,
true
,
"UPDATE"
,
2
,
"SCAN"
,
274
,
X
,
0
,
2
},
{
"UpdateScan"
,
true
,
"UPDATE"
,
2
,
"SCAN"
,
0
,
1
,
0
,
2
},
{
"UpdateScanHl"
,
true
,
"UPDATE"
,
2
,
"SCAN-HL"
,
274
,
X
,
0
,
2
},
{
"UpdateScanEx"
,
true
,
"UPDATE"
,
2
,
"SCAN-EX"
,
274
,
X
,
0
,
2
},
#if 0
...
...
@@ -162,7 +162,7 @@ OperationTestCase matrix[] = {
{
"DeleteInsert"
,
true
,
"DELETE"
,
X
,
"INSERT"
,
266
,
X
,
626
,
X
},
{
"DeleteUpdate"
,
true
,
"DELETE"
,
X
,
"UPDATE"
,
266
,
X
,
626
,
X
},
{
"DeleteDelete"
,
true
,
"DELETE"
,
X
,
"DELETE"
,
266
,
X
,
626
,
X
},
{
"DeleteScan"
,
true
,
"DELETE"
,
X
,
"SCAN"
,
274
,
X
,
626
,
X
},
{
"DeleteScan"
,
true
,
"DELETE"
,
X
,
"SCAN"
,
0
,
1
,
626
,
X
},
{
"DeleteScanHl"
,
true
,
"DELETE"
,
X
,
"SCAN-HL"
,
274
,
X
,
626
,
X
},
{
"DeleteScanEx"
,
true
,
"DELETE"
,
X
,
"SCAN-EX"
,
274
,
X
,
626
,
X
},
#if 0
...
...
@@ -204,14 +204,11 @@ runOp(HugoOperations & hugoOps,
}
else
if
(
strcmp
(
op
,
"DELETE"
)
==
0
){
C2
(
hugoOps
.
pkDeleteRecord
(
pNdb
,
1
,
1
)
==
0
);
}
else
if
(
strcmp
(
op
,
"SCAN"
)
==
0
){
abort
();
//C2(hugoOps.scanReadRecords(pNdb) == 0);
C2
(
hugoOps
.
scanReadRecords
(
pNdb
)
==
0
);
}
else
if
(
strcmp
(
op
,
"SCAN-HL"
)
==
0
){
abort
();
//C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_ReadHold)== 0);
C2
(
hugoOps
.
scanReadRecords
(
pNdb
,
NdbScanOperation
::
LM_Read
)
==
0
);
}
else
if
(
strcmp
(
op
,
"SCAN-EX"
)
==
0
){
abort
();
//C2(hugoOps.scanReadRecords(pNdb, 240, HugoOperations::SL_Exclusive)== 0);
C2
(
hugoOps
.
scanReadRecords
(
pNdb
,
NdbScanOperation
::
LM_Exclusive
)
==
0
);
}
else
{
g_err
<<
__FILE__
<<
" - "
<<
__LINE__
<<
": Unknown operation"
<<
op
<<
endl
;
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
ad325516
...
...
@@ -139,10 +139,6 @@ max-time: 500
cmd: testBasicAsynch
args: -n PkDeleteAsynch
max-time:
cmd: ndb_drop_table
args: T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14
max-time: 500
cmd: testBasic
args: -n MassiveRollback T1 T6 T13
...
...
@@ -152,34 +148,34 @@ 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
#
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
# SCAN TESTS
#
max-time: 500
...
...
@@ -786,6 +782,186 @@ max-time: 1500
cmd: testTransactions
args: -n DeleteDirtyRead
max-time: 1500
cmd: testTransactions
args: -n ReadScan
max-time: 1500
cmd: testTransactions
args: -n ReadScanHl
max-time: 1500
cmd: testTransactions
args: -n ReadScanEx
max-time: 1500
cmd: testTransactions
args: -n ScanRead
max-time: 1500
cmd: testTransactions
args: -n ScanReadEx
max-time: 1500
cmd: testTransactions
args: -n ScanSimpleRead
max-time: 1500
cmd: testTransactions
args: -n ScanDirtyRead
max-time: 1500
cmd: testTransactions
args: -n ScanInsert
max-time: 1500
cmd: testTransactions
args: -n ScanUpdate
max-time: 1500
cmd: testTransactions
args: -n ScanDelete
max-time: 1500
cmd: testTransactions
args: -n ScanScan
max-time: 1500
cmd: testTransactions
args: -n ScanScanHl
max-time: 1500
cmd: testTransactions
args: -n ScanScanEx
max-time: 1500
cmd: testTransactions
args: -n ScanHlRead
max-time: 1500
cmd: testTransactions
args: -n ScanHlReadEx
max-time: 1500
cmd: testTransactions
args: -n ScanHlSimpleRead
max-time: 1500
cmd: testTransactions
args: -n ScanHlDirtyRead
max-time: 1500
cmd: testTransactions
args: -n ScanHlInsert
max-time: 1500
cmd: testTransactions
args: -n ScanHlUpdate
max-time: 1500
cmd: testTransactions
args: -n ScanHlDelete
max-time: 1500
cmd: testTransactions
args: -n ScanHlScan
max-time: 1500
cmd: testTransactions
args: -n ScanHlScanHl
max-time: 1500
cmd: testTransactions
args: -n ScanHlScanEx
max-time: 1500
cmd: testTransactions
args: -n ScanExRead
max-time: 1500
cmd: testTransactions
args: -n ScanExReadEx
max-time: 1500
cmd: testTransactions
args: -n ScanExSimpleRead
max-time: 1500
cmd: testTransactions
args: -n ScanExDirtyRead
max-time: 1500
cmd: testTransactions
args: -n ScanExInsert
max-time: 1500
cmd: testTransactions
args: -n ScanExUpdate
max-time: 1500
cmd: testTransactions
args: -n ScanExDelete
max-time: 1500
cmd: testTransactions
args: -n ScanExScan
max-time: 1500
cmd: testTransactions
args: -n ScanExScanHl
max-time: 1500
cmd: testTransactions
args: -n ScanExScanEx
max-time: 1500
cmd: testTransactions
args: -n ReadExScan
max-time: 1500
cmd: testTransactions
args: -n ReadExScanHl
max-time: 1500
cmd: testTransactions
args: -n ReadExScanEx
max-time: 1500
cmd: testTransactions
args: -n InsertScan
max-time: 1500
cmd: testTransactions
args: -n InsertScanHl
max-time: 1500
cmd: testTransactions
args: -n InsertScanEx
max-time: 1500
cmd: testTransactions
args: -n UpdateScan
max-time: 1500
cmd: testTransactions
args: -n UpdateScanHl
max-time: 1500
cmd: testTransactions
args: -n UpdateScanEx
max-time: 1500
cmd: testTransactions
args: -n DeleteScan
max-time: 1500
cmd: testTransactions
args: -n DeleteScanHl
max-time: 1500
cmd: testTransactions
args: -n DeleteScanEx
max-time: 1500
cmd: testRestartGci
args: T6
...
...
ndb/test/src/HugoOperations.cpp
View file @
ad325516
...
...
@@ -40,6 +40,9 @@ int HugoOperations::closeTransaction(Ndb* pNdb){
}
pTrans
=
NULL
;
m_result_sets
.
clear
();
m_executed_result_sets
.
clear
();
return
NDBT_OK
;
}
...
...
@@ -291,7 +294,7 @@ int HugoOperations::pkDeleteRecord(Ndb* pNdb,
}
return
NDBT_OK
;
}
#if 0
NdbResultSet*
HugoOperations::scanReadRecords(Ndb* pNdb, ScanLock lock){
...
...
@@ -349,6 +352,7 @@ HugoOperations::readTuples(NdbResultSet* rs){
return NDBT_FAILED;
return NDBT_OK;
}
#endif
int
HugoOperations
::
execute_Commit
(
Ndb
*
pNdb
,
AbortOption
eao
){
...
...
@@ -368,6 +372,35 @@ int HugoOperations::execute_Commit(Ndb* pNdb,
return
NDBT_FAILED
;
return
err
.
code
;
}
for
(
int
i
=
0
;
i
<
m_result_sets
.
size
();
i
++
){
m_executed_result_sets
.
push_back
(
m_result_sets
[
i
]);
int
rows
=
m_result_sets
[
i
].
records
;
NdbResultSet
*
rs
=
m_result_sets
[
i
].
m_result_set
;
int
res
=
rs
->
nextResult
();
switch
(
res
){
case
1
:
return
626
;
case
-
1
:
const
NdbError
err
=
pTrans
->
getNdbError
();
ERR
(
err
);
return
(
err
.
code
>
0
?
err
.
code
:
NDBT_FAILED
);
}
// A row found
switch
(
rows
){
case
0
:
return
4000
;
default:
m_result_sets
[
i
].
records
--
;
break
;
}
}
m_result_sets
.
clear
();
return
NDBT_OK
;
}
...
...
@@ -388,6 +421,35 @@ int HugoOperations::execute_NoCommit(Ndb* pNdb, AbortOption eao){
return
NDBT_FAILED
;
return
err
.
code
;
}
for
(
int
i
=
0
;
i
<
m_result_sets
.
size
();
i
++
){
m_executed_result_sets
.
push_back
(
m_result_sets
[
i
]);
int
rows
=
m_result_sets
[
i
].
records
;
NdbResultSet
*
rs
=
m_result_sets
[
i
].
m_result_set
;
int
res
=
rs
->
nextResult
();
switch
(
res
){
case
1
:
return
626
;
case
-
1
:
const
NdbError
err
=
pTrans
->
getNdbError
();
ERR
(
err
);
return
(
err
.
code
>
0
?
err
.
code
:
NDBT_FAILED
);
}
// A row found
switch
(
rows
){
case
0
:
return
4000
;
default:
case
1
:
break
;
}
}
m_result_sets
.
clear
();
return
NDBT_OK
;
}
...
...
@@ -704,3 +766,33 @@ HugoOperations::indexUpdateRecord(Ndb*,
}
return
NDBT_OK
;
}
int
HugoOperations
::
scanReadRecords
(
Ndb
*
pNdb
,
NdbScanOperation
::
LockMode
lm
,
int
records
){
allocRows
(
records
);
NdbScanOperation
*
pOp
=
pTrans
->
getNdbScanOperation
(
tab
.
getName
());
if
(
!
pOp
)
return
-
1
;
NdbResultSet
*
rs
=
pOp
->
readTuples
(
lm
,
1
,
1
);
if
(
!
rs
){
return
-
1
;
}
for
(
int
a
=
0
;
a
<
tab
.
getNoOfColumns
();
a
++
){
if
((
rows
[
0
]
->
attributeStore
(
a
)
=
pOp
->
getValue
(
tab
.
getColumn
(
a
)
->
getName
()))
==
0
)
{
ERR
(
pTrans
->
getNdbError
());
return
NDBT_FAILED
;
}
}
RsPair
p
=
{
rs
,
records
};
m_result_sets
.
push_back
(
p
);
return
0
;
}
ndb/test/src/NDBT_Test.cpp
View file @
ad325516
...
...
@@ -820,15 +820,15 @@ void NDBT_TestSuite::execute(Ndb* ndb, const NdbDictionary::Table* pTab,
const
NdbDictionary
::
Table
*
pTab2
=
pDict
->
getTable
(
pTab
->
getName
());
if
(
createTable
==
true
){
if
(
pTab2
!=
0
&&
!
pTab
->
equal
(
*
pTab2
)
){
if
(
pTab2
!=
0
&&
pDict
->
dropTable
(
pTab
->
getName
())
!=
0
){
numTestsFail
++
;
numTestsExecuted
++
;
g_err
<<
"ERROR0: Failed to
create
table "
<<
pTab
->
getName
()
<<
endl
;
g_err
<<
"ERROR0: Failed to
drop
table "
<<
pTab
->
getName
()
<<
endl
;
tests
[
t
]
->
saveTestResult
(
pTab
,
FAILED_TO_CREATE
);
continue
;
}
if
(
p
Tab2
==
0
&&
p
Dict
->
createTable
(
*
pTab
)
!=
0
){
if
(
pDict
->
createTable
(
*
pTab
)
!=
0
){
numTestsFail
++
;
numTestsExecuted
++
;
g_err
<<
"ERROR1: Failed to create table "
<<
pTab
->
getName
()
...
...
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