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
85220e39
Commit
85220e39
authored
Mar 15, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
f8483ecc
1bf8202f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
158 additions
and
1 deletion
+158
-1
storage/ndb/src/kernel/blocks/suma/Suma.cpp
storage/ndb/src/kernel/blocks/suma/Suma.cpp
+4
-1
storage/ndb/test/ndbapi/test_event.cpp
storage/ndb/test/ndbapi/test_event.cpp
+150
-0
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
storage/ndb/src/kernel/blocks/suma/Suma.cpp
View file @
85220e39
...
...
@@ -5001,8 +5001,11 @@ Suma::resend_bucket(Signal* signal, Uint32 buck, Uint32 min_gci,
{
continue
;
}
ndbrequire
(
sz
);
sz
--
;
// remove *len* part of sz
if
(
sz
==
1
)
if
(
sz
==
0
)
{
SubGcpCompleteRep
*
rep
=
(
SubGcpCompleteRep
*
)
signal
->
getDataPtrSend
();
rep
->
gci
=
last_gci
;
...
...
storage/ndb/test/ndbapi/test_event.cpp
View file @
85220e39
...
...
@@ -836,6 +836,67 @@ end:
DBUG_RETURN
(
result
);
}
int
runEventListenerUntilStopped
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
result
=
NDBT_OK
;
const
NdbDictionary
::
Table
*
table
=
ctx
->
getTab
();
HugoTransactions
hugoTrans
(
*
table
);
char
buf
[
1024
];
sprintf
(
buf
,
"%s_EVENT"
,
table
->
getName
());
NdbEventOperation
*
pOp
,
*
pCreate
=
0
;
pCreate
=
pOp
=
GETNDB
(
step
)
->
createEventOperation
(
buf
);
if
(
pOp
==
NULL
)
{
g_err
<<
"Event operation creation failed on %s"
<<
buf
<<
endl
;
return
NDBT_FAILED
;
}
int
i
;
int
n_columns
=
table
->
getNoOfColumns
();
NdbRecAttr
*
recAttr
[
1024
];
NdbRecAttr
*
recAttrPre
[
1024
];
for
(
i
=
0
;
i
<
n_columns
;
i
++
)
{
recAttr
[
i
]
=
pOp
->
getValue
(
table
->
getColumn
(
i
)
->
getName
());
recAttrPre
[
i
]
=
pOp
->
getPreValue
(
table
->
getColumn
(
i
)
->
getName
());
}
if
(
pOp
->
execute
())
{
// This starts changes to "start flowing"
g_err
<<
"execute operation execution failed:
\n
"
;
g_err
<<
pOp
->
getNdbError
().
code
<<
" "
<<
pOp
->
getNdbError
().
message
<<
endl
;
result
=
NDBT_FAILED
;
goto
end
;
}
Ndb
*
ndb
=
GETNDB
(
step
);
while
(
!
ctx
->
isTestStopped
())
{
Uint64
curr_gci
=
0
;
while
(
!
ctx
->
isTestStopped
())
{
ndb
->
pollEvents
(
100
,
&
curr_gci
);
while
((
pOp
=
ndb
->
nextEvent
())
!=
0
)
{
assert
(
pOp
==
pCreate
);
}
}
}
end:
if
(
pCreate
)
{
if
(
GETNDB
(
step
)
->
dropEventOperation
(
pCreate
))
{
g_err
<<
"dropEventOperation execution failed "
<<
GETNDB
(
step
)
->
getNdbError
().
code
<<
" "
<<
GETNDB
(
step
)
->
getNdbError
().
message
<<
endl
;
result
=
NDBT_FAILED
;
}
}
return
result
;
}
int
runRestarter
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
...
...
@@ -877,6 +938,51 @@ int runRestarter(NDBT_Context* ctx, NDBT_Step* step){
return
result
;
}
int
runRestarterLoop
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
NdbRestarter
restarter
;
int
i
=
0
;
int
lastId
=
0
;
if
(
restarter
.
getNumDbNodes
()
<
2
){
ctx
->
stopTest
();
return
NDBT_OK
;
}
if
(
restarter
.
waitClusterStarted
(
60
)
!=
0
){
g_err
<<
"Cluster failed to start"
<<
endl
;
return
NDBT_FAILED
;
}
while
(
result
!=
NDBT_FAILED
&&
!
ctx
->
isTestStopped
()
&&
i
<
loops
)
{
int
id
=
lastId
%
restarter
.
getNumDbNodes
();
int
nodeId
=
restarter
.
getDbNodeId
(
id
);
ndbout
<<
"Restart node "
<<
nodeId
<<
endl
;
if
(
restarter
.
restartOneDbNode
(
nodeId
,
false
,
false
,
true
)
!=
0
){
g_err
<<
"Failed to restartNextDbNode"
<<
endl
;
result
=
NDBT_FAILED
;
break
;
}
if
(
restarter
.
waitClusterStarted
(
60
)
!=
0
){
g_err
<<
"Cluster failed to start"
<<
endl
;
result
=
NDBT_FAILED
;
break
;
}
lastId
++
;
i
++
;
}
ctx
->
stopTest
();
return
result
;
}
Vector
<
const
NdbDictionary
::
Table
*>
pTabs
;
Vector
<
const
NdbDictionary
::
Table
*>
pShadowTabs
;
...
...
@@ -1616,6 +1722,42 @@ runSubscribeUnsubscribe(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
}
int
runScanUpdateUntilStopped
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
records
=
ctx
->
getNumRecords
();
int
parallelism
=
ctx
->
getProperty
(
"Parallelism"
,
(
Uint32
)
0
);
int
abort
=
ctx
->
getProperty
(
"AbortProb"
,
(
Uint32
)
0
);
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
while
(
ctx
->
isTestStopped
()
==
false
)
{
if
(
hugoTrans
.
scanUpdateRecords
(
GETNDB
(
step
),
records
,
abort
,
parallelism
)
==
NDBT_FAILED
){
return
NDBT_FAILED
;
}
}
return
NDBT_OK
;
}
int
runInsertDeleteUntilStopped
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
result
=
NDBT_OK
;
int
records
=
ctx
->
getNumRecords
();
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
UtilTransactions
utilTrans
(
*
ctx
->
getTab
());
while
(
ctx
->
isTestStopped
()
==
false
)
{
if
(
hugoTrans
.
loadTable
(
GETNDB
(
step
),
records
,
1
)
!=
0
){
return
NDBT_FAILED
;
}
if
(
utilTrans
.
clearTable
(
GETNDB
(
step
),
records
)
!=
0
){
return
NDBT_FAILED
;
}
}
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
test_event
);
TESTCASE
(
"BasicEventOperation"
,
"Verify that we can listen to Events"
...
...
@@ -1737,6 +1879,14 @@ TESTCASE("SubscribeUnsubscribe",
STEPS
(
runSubscribeUnsubscribe
,
16
);
FINALIZER
(
runDropEvent
);
}
TESTCASE
(
"Bug27169"
,
""
){
INITIALIZER
(
runCreateEvent
);
STEP
(
runEventListenerUntilStopped
);
STEP
(
runInsertDeleteUntilStopped
);
STEP
(
runScanUpdateUntilStopped
);
STEP
(
runRestarterLoop
);
FINALIZER
(
runDropEvent
);
}
NDBT_TESTSUITE_END
(
test_event
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
85220e39
...
...
@@ -796,6 +796,10 @@ max-time: 1000
cmd: testNodeRestart
args: -n Bug25468 T1
max-time: 1000
cmd: test_event
args: -l 10 -n Bug27169 T1
# OLD FLEX
max-time: 500
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