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
0fd88d62
Commit
0fd88d62
authored
Nov 23, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge pmartin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/usr/home/pem/mysql-5.1-new
parents
ac41c2f0
d49b3deb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
storage/ndb/test/tools/listen.cpp
storage/ndb/test/tools/listen.cpp
+24
-13
No files found.
storage/ndb/test/tools/listen.cpp
View file @
0fd88d62
...
...
@@ -64,7 +64,6 @@ main(int argc, const char** argv){
ndbout
<<
"Waiting for ndb to become ready..."
<<
endl
;
int
result
=
0
;
Uint64
last_gci
=
0
,
cnt
=
0
;
NdbDictionary
::
Dictionary
*
myDict
=
MyNdb
.
getDictionary
();
Vector
<
NdbDictionary
::
Event
*>
events
;
...
...
@@ -91,7 +90,7 @@ main(int argc, const char** argv){
{
if
(
myDict
->
getNdbError
().
classification
==
NdbError
::
SchemaObjectExists
)
{
g_info
<<
"Event creation failed event exists
\n
"
;
g_info
<<
"Event creation failed event exists
. Removing...
\n
"
;
if
(
myDict
->
dropEvent
(
name
.
c_str
()))
{
g_err
<<
"Failed to drop event: "
<<
myDict
->
getNdbError
()
<<
endl
;
...
...
@@ -146,19 +145,31 @@ main(int argc, const char** argv){
{
while
(
MyNdb
.
pollEvents
(
100
)
==
0
);
NdbEventOperation
*
pOp
;
while
(
(
pOp
=
MyNdb
.
nextEvent
())
!=
0
)
NdbEventOperation
*
pOp
=
MyNdb
.
nextEvent
()
;
while
(
pOp
)
{
if
(
pOp
->
getGCI
()
!=
last_gci
)
Uint64
gci
=
pOp
->
getGCI
();
Uint64
cnt_i
=
0
,
cnt_u
=
0
,
cnt_d
=
0
;
do
{
if
(
cnt
)
ndbout_c
(
"GCI: %lld events: %lld"
,
last_gci
,
cnt
);
cnt
=
1
;
last_gci
=
pOp
->
getGCI
();
}
else
switch
(
pOp
->
getEventType
())
{
cnt
++
;
}
case
NdbDictionary
:
:
Event
::
TE_INSERT
:
cnt_i
++
;
break
;
case
NdbDictionary
:
:
Event
::
TE_DELETE
:
cnt_d
++
;
break
;
case
NdbDictionary
:
:
Event
::
TE_UPDATE
:
cnt_u
++
;
break
;
default:
/* We should REALLY never get here. */
ndbout_c
(
"Error: unknown event type"
);
abort
();
}
}
while
((
pOp
=
MyNdb
.
nextEvent
())
&&
gci
==
pOp
->
getGCI
());
ndbout_c
(
"GCI: %lld events: %lld(I) %lld(U) %lld(D)"
,
gci
,
cnt_i
,
cnt_u
,
cnt_d
);
}
}
end:
...
...
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