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
a7714519
Commit
a7714519
authored
Mar 14, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
1bcac85f
72bd3670
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
27 deletions
+57
-27
storage/ndb/src/kernel/blocks/suma/Suma.cpp
storage/ndb/src/kernel/blocks/suma/Suma.cpp
+50
-26
storage/ndb/test/tools/listen.cpp
storage/ndb/test/tools/listen.cpp
+7
-1
No files found.
storage/ndb/src/kernel/blocks/suma/Suma.cpp
View file @
a7714519
...
...
@@ -758,6 +758,17 @@ Suma::execNODE_FAILREP(Signal* signal){
Restart
.
resetRestart
(
signal
);
}
if
(
ERROR_INSERTED
(
13032
))
{
Uint32
node
=
c_subscriber_nodes
.
find
(
0
);
if
(
node
!=
NodeBitmask
::
NotFound
)
{
ndbout_c
(
"Inserting API_FAILREQ node: %u"
,
node
);
signal
->
theData
[
0
]
=
node
;
EXECUTE_DIRECT
(
QMGR
,
GSN_API_FAILREQ
,
signal
,
1
);
}
}
signal
->
theData
[
0
]
=
SumaContinueB
::
RESEND_BUCKET
;
NdbNodeBitmask
tmp
;
...
...
@@ -3462,7 +3473,10 @@ Suma::execFIRE_TRIG_ORD(Signal* signal)
*/
f_bufferLock
=
0
;
b_bufferLock
=
0
;
ndbrequire
((
tabPtr
.
p
=
c_tablePool
.
getPtr
(
tabPtr
.
i
))
!=
0
);
Uint32
tableId
=
tabPtr
.
p
->
m_tableId
;
Uint32
bucket
=
hashValue
%
c_no_of_buckets
;
m_max_seen_gci
=
(
gci
>
m_max_seen_gci
?
gci
:
m_max_seen_gci
);
if
(
m_active_buckets
.
get
(
bucket
)
||
...
...
@@ -3485,7 +3499,7 @@ Suma::execFIRE_TRIG_ORD(Signal* signal)
SubTableData
*
data
=
(
SubTableData
*
)
signal
->
getDataPtrSend
();
//trg;
data
->
gci
=
gci
;
data
->
tableId
=
tab
Ptr
.
p
->
m_tab
leId
;
data
->
tableId
=
tableId
;
data
->
requestInfo
=
0
;
SubTableData
::
setOperation
(
data
->
requestInfo
,
event
);
data
->
logType
=
0
;
...
...
@@ -3508,10 +3522,11 @@ Suma::execFIRE_TRIG_ORD(Signal* signal)
else
{
Uint32
*
dst
;
Uint32
sz
=
f_trigBufferSize
+
b_trigBufferSize
+
2
;
Uint32
sz
=
f_trigBufferSize
+
b_trigBufferSize
+
3
;
if
((
dst
=
get_buffer_ptr
(
signal
,
bucket
,
gci
,
sz
)))
{
*
dst
++
=
tabPtr
.
i
;
*
dst
++
=
tableId
;
*
dst
++
=
tabPtr
.
p
->
m_schemaVersion
;
*
dst
++
=
(
event
<<
16
)
|
f_trigBufferSize
;
memcpy
(
dst
,
f_buffer
,
f_trigBufferSize
<<
2
);
dst
+=
f_trigBufferSize
;
...
...
@@ -3643,6 +3658,7 @@ Suma::execSUB_GCP_COMPLETE_REP(Signal* signal)
if
(
c_buckets
[
i
].
m_buffer_tail
!=
RNIL
)
{
//Uint32* dst;
get_buffer_ptr
(
signal
,
i
,
gci
,
0
);
}
}
...
...
@@ -3987,6 +4003,9 @@ void
Suma
::
completeSubRemove
(
SubscriptionPtr
subPtr
)
{
DBUG_ENTER
(
"Suma::completeSubRemove"
);
//Uint32 subscriptionId = subPtr.p->m_subscriptionId;
//Uint32 subscriptionKey = subPtr.p->m_subscriptionKey;
c_subscriptions
.
release
(
subPtr
);
DBUG_PRINT
(
"info"
,(
"c_subscriptionPool size: %d free: %d"
,
c_subscriptionPool
.
getSize
(),
...
...
@@ -5003,43 +5022,48 @@ Suma::resend_bucket(Signal* signal, Uint32 buck, Uint32 min_gci,
{
g_cnt
++
;
Uint32
table
=
*
src
++
;
Uint32
schemaVersion
=
*
src
++
;
Uint32
event
=
*
src
>>
16
;
Uint32
sz_1
=
(
*
src
++
)
&
0xFFFF
;
ndbassert
(
sz
-
2
>=
sz_1
);
ndbassert
(
sz
-
3
>=
sz_1
);
LinearSectionPtr
ptr
[
3
];
const
Uint32
nptr
=
reformat
(
signal
,
ptr
,
src
,
sz_1
,
src
+
sz_1
,
sz
-
2
-
sz_1
);
src
+
sz_1
,
sz
-
3
-
sz_1
);
Uint32
ptrLen
=
0
;
for
(
Uint32
i
=
0
;
i
<
nptr
;
i
++
)
ptrLen
+=
ptr
[
i
].
sz
;
/**
* Signal to subscriber(s)
*/
Ptr
<
Table
>
tabPtr
;
ndbrequire
((
tabPtr
.
p
=
c_tablePool
.
getPtr
(
table
))
!=
0
);
SubTableData
*
data
=
(
SubTableData
*
)
signal
->
getDataPtrSend
();
//trg;
data
->
gci
=
last_gci
;
data
->
tableId
=
tabPtr
.
p
->
m_tableId
;
data
->
requestInfo
=
0
;
SubTableData
::
setOperation
(
data
->
requestInfo
,
event
);
data
->
logType
=
0
;
data
->
changeMask
=
0
;
data
->
totalLen
=
ptrLen
;
if
(
c_tables
.
find
(
tabPtr
,
table
)
&&
tabPtr
.
p
->
m_schemaVersion
==
schemaVersion
)
{
LocalDLList
<
Subscriber
>
list
(
c_subscriberPool
,
tabPtr
.
p
->
c_subscribers
);
SubscriberPtr
subbPtr
;
for
(
list
.
first
(
subbPtr
);
!
subbPtr
.
isNull
();
list
.
next
(
subbPtr
))
SubTableData
*
data
=
(
SubTableData
*
)
signal
->
getDataPtrSend
();
//trg;
data
->
gci
=
last_gci
;
data
->
tableId
=
table
;
data
->
requestInfo
=
0
;
SubTableData
::
setOperation
(
data
->
requestInfo
,
event
);
data
->
logType
=
0
;
data
->
changeMask
=
0
;
data
->
totalLen
=
ptrLen
;
{
DBUG_PRINT
(
"info"
,(
"GSN_SUB_TABLE_DATA to node %d"
,
refToNode
(
subbPtr
.
p
->
m_senderRef
)));
data
->
senderData
=
subbPtr
.
p
->
m_senderData
;
sendSignal
(
subbPtr
.
p
->
m_senderRef
,
GSN_SUB_TABLE_DATA
,
signal
,
SubTableData
::
SignalLength
,
JBB
,
ptr
,
nptr
);
LocalDLList
<
Subscriber
>
list
(
c_subscriberPool
,
tabPtr
.
p
->
c_subscribers
);
SubscriberPtr
subbPtr
;
for
(
list
.
first
(
subbPtr
);
!
subbPtr
.
isNull
();
list
.
next
(
subbPtr
))
{
DBUG_PRINT
(
"info"
,(
"GSN_SUB_TABLE_DATA to node %d"
,
refToNode
(
subbPtr
.
p
->
m_senderRef
)));
data
->
senderData
=
subbPtr
.
p
->
m_senderData
;
sendSignal
(
subbPtr
.
p
->
m_senderRef
,
GSN_SUB_TABLE_DATA
,
signal
,
SubTableData
::
SignalLength
,
JBB
,
ptr
,
nptr
);
}
}
}
}
...
...
storage/ndb/test/tools/listen.cpp
View file @
a7714519
...
...
@@ -168,9 +168,15 @@ main(int argc, const char** argv){
break
;
case
NdbDictionary
:
:
Event
::
TE_DROP
:
break
;
case
NdbDictionary
:
:
Event
::
TE_NODE_FAILURE
:
break
;
case
NdbDictionary
:
:
Event
::
TE_SUBSCRIBE
:
case
NdbDictionary
:
:
Event
::
TE_UNSUBSCRIBE
:
break
;
default:
/* We should REALLY never get here. */
ndbout_c
(
"Error: unknown event type"
);
ndbout_c
(
"Error: unknown event type: %u"
,
(
Uint32
)
pOp
->
getEventType
());
abort
();
}
}
while
((
pOp
=
MyNdb
.
nextEvent
())
&&
gci
==
pOp
->
getGCI
());
...
...
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