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
b358c5cb
Commit
b358c5cb
authored
Jan 13, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/space/pekka/ndb/version/my51
parents
32944ad2
0953c40f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
17 deletions
+11
-17
storage/ndb/include/ndbapi/NdbEventOperation.hpp
storage/ndb/include/ndbapi/NdbEventOperation.hpp
+2
-4
storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp
storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp
+2
-2
storage/ndb/src/ndbapi/NdbEventOperation.cpp
storage/ndb/src/ndbapi/NdbEventOperation.cpp
+2
-2
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+2
-2
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
+1
-1
storage/ndb/test/ndbapi/test_event.cpp
storage/ndb/test/ndbapi/test_event.cpp
+0
-4
storage/ndb/test/ndbapi/test_event_merge.cpp
storage/ndb/test/ndbapi/test_event_merge.cpp
+2
-2
No files found.
storage/ndb/include/ndbapi/NdbEventOperation.hpp
View file @
b358c5cb
...
...
@@ -94,11 +94,9 @@ public:
*/
State
getState
();
/**
* By default events on same NdbEventOperation within same GCI
* are merged into a single event. This can be changed with
* separateEvents(true).
* See NdbDictionary::Event. Default is false.
*/
void
separat
eEvents
(
bool
flag
);
void
merg
eEvents
(
bool
flag
);
/**
* Activates the NdbEventOperation to start receiving events. The
...
...
storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp
View file @
b358c5cb
...
...
@@ -100,7 +100,7 @@ int myCreateEvent(Ndb* myNdb,
int
main
(
int
argc
,
char
**
argv
)
{
ndb_init
();
bool
sep
=
argc
>
1
&&
strcmp
(
argv
[
1
],
"-s
"
)
==
0
;
bool
merge_events
=
argc
>
1
&&
strcmp
(
argv
[
1
],
"-m
"
)
==
0
;
Ndb_cluster_connection
*
cluster_connection
=
new
Ndb_cluster_connection
();
// Object representing the cluster
...
...
@@ -157,7 +157,7 @@ int main(int argc, char** argv)
printf
(
"create EventOperation
\n
"
);
if
((
op
=
myNdb
->
createEventOperation
(
eventName
))
==
NULL
)
APIERROR
(
myNdb
->
getNdbError
());
op
->
separateEvents
(
sep
);
op
->
mergeEvents
(
merge_events
);
printf
(
"get values
\n
"
);
NdbRecAttr
*
recAttr
[
noEventColumnName
];
...
...
storage/ndb/src/ndbapi/NdbEventOperation.cpp
View file @
b358c5cb
...
...
@@ -38,9 +38,9 @@ NdbEventOperation::State NdbEventOperation::getState()
return
m_impl
.
getState
();
}
void
NdbEventOperation
::
separat
eEvents
(
bool
flag
)
void
NdbEventOperation
::
merg
eEvents
(
bool
flag
)
{
m_impl
.
m_
separat
eEvents
=
flag
;
m_impl
.
m_
merg
eEvents
=
flag
;
}
NdbRecAttr
*
...
...
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
View file @
b358c5cb
...
...
@@ -104,7 +104,7 @@ NdbEventOperationImpl::NdbEventOperationImpl(NdbEventOperation &N,
m_state
=
EO_CREATED
;
m_
separateEvents
=
tru
e
;
m_
mergeEvents
=
fals
e
;
m_has_error
=
0
;
...
...
@@ -1168,7 +1168,7 @@ NdbEventBuffer::insertDataL(NdbEventOperationImpl *op,
}
bool
use_hash
=
!
op
->
m_separat
eEvents
&&
op
->
m_merg
eEvents
&&
sdata
->
operation
<
NdbDictionary
::
Event
::
_TE_FIRST_NON_DATA_EVENT
;
// find position in bucket hash table
...
...
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
View file @
b358c5cb
...
...
@@ -206,7 +206,7 @@ public:
Uint32
m_eventId
;
Uint32
m_oid
;
bool
m_
separat
eEvents
;
bool
m_
merg
eEvents
;
EventBufData
*
m_data_item
;
...
...
storage/ndb/test/ndbapi/test_event.cpp
View file @
b358c5cb
...
...
@@ -169,7 +169,6 @@ eventOperation(Ndb* pNdb, const NdbDictionary::Table &tab, void* pstats, int rec
g_err
<<
function
<<
"Event operation creation failed
\n
"
;
return
NDBT_FAILED
;
}
pOp
->
separateEvents
(
true
);
g_info
<<
function
<<
"get values
\n
"
;
NdbRecAttr
*
recAttr
[
1024
];
...
...
@@ -381,7 +380,6 @@ int runCreateDropEventOperation(NDBT_Context* ctx, NDBT_Step* step)
g_err
<<
"Event operation creation failed
\n
"
;
return
NDBT_FAILED
;
}
pOp
->
separateEvents
(
true
);
g_info
<<
"dropping event operation"
<<
endl
;
int
res
=
pNdb
->
dropEventOperation
(
pOp
);
...
...
@@ -552,7 +550,6 @@ int runEventApplier(NDBT_Context* ctx, NDBT_Step* step)
g_err
<<
"Event operation creation failed on %s"
<<
buf
<<
endl
;
DBUG_RETURN
(
NDBT_FAILED
);
}
pOp
->
separateEvents
(
true
);
int
i
;
int
n_columns
=
table
->
getNoOfColumns
();
...
...
@@ -1198,7 +1195,6 @@ static int createEventOperations(Ndb * ndb)
{
DBUG_RETURN
(
NDBT_FAILED
);
}
pOp
->
separateEvents
(
true
);
int
n_columns
=
pTabs
[
i
]
->
getNoOfColumns
();
for
(
int
j
=
0
;
j
<
n_columns
;
j
++
)
...
...
storage/ndb/test/ndbapi/test_event_merge.cpp
View file @
b358c5cb
...
...
@@ -850,7 +850,7 @@ createevent()
evt
.
addEventColumn
(
c
.
name
);
}
#ifdef version51rbr
evt
.
separateEvents
(
g_opts
.
separate_events
);
evt
.
mergeEvents
(
!
g_opts
.
separate_events
);
#endif
if
(
g_dic
->
getEvent
(
evt
.
getName
())
!=
0
)
chkdb
(
g_dic
->
dropEvent
(
evt
.
getName
())
==
0
);
...
...
@@ -881,7 +881,7 @@ createeventop()
#else
chkdb
((
g_evt_op
=
g_ndb
->
createEventOperation
(
g_evt
->
getName
()))
!=
0
);
// available in gci merge changeset
g_evt_op
->
separateEvents
(
g_opts
.
separate_events
);
// not yet inherited
g_evt_op
->
mergeEvents
(
!
g_opts
.
separate_events
);
// not yet inherited
#endif
uint
i
;
for
(
i
=
0
;
i
<
ncol
();
i
++
)
{
...
...
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