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
7a0179e1
Commit
7a0179e1
authored
Dec 01, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
32c67ca0
76430403
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
5 deletions
+99
-5
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+23
-1
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+4
-4
storage/ndb/src/kernel/vm/KeyTable2.hpp
storage/ndb/src/kernel/vm/KeyTable2.hpp
+72
-0
No files found.
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
7a0179e1
...
@@ -3624,7 +3624,11 @@ void Dbdict::execNODE_FAILREP(Signal* signal)
...
@@ -3624,7 +3624,11 @@ void Dbdict::execNODE_FAILREP(Signal* signal)
case
BS_IDLE
:
case
BS_IDLE
:
jam
();
jam
();
ok
=
true
;
ok
=
true
;
if
(
c_opRecordPool
.
getSize
()
!=
c_opRecordPool
.
getNoOfFree
()){
if
(
c_opRecordPool
.
getSize
()
!=
(
c_opRecordPool
.
getNoOfFree
()
+
c_opSubEvent
.
get_count
()
+
c_opCreateEvent
.
get_count
()
+
c_opDropEvent
.
get_count
()
+
c_opSignalUtil
.
get_count
()))
{
jam
();
jam
();
c_blockState
=
BS_NODE_FAILURE
;
c_blockState
=
BS_NODE_FAILURE
;
}
}
...
@@ -9846,6 +9850,8 @@ Dbdict::createEvent_RT_DICT_AFTER_GET(Signal* signal, OpCreateEventPtr evntRecPt
...
@@ -9846,6 +9850,8 @@ Dbdict::createEvent_RT_DICT_AFTER_GET(Signal* signal, OpCreateEventPtr evntRecPt
// Seize a Create Event record, the Coordinator will now have two seized
// Seize a Create Event record, the Coordinator will now have two seized
// but that's ok, it's like a recursion
// but that's ok, it's like a recursion
CRASH_INSERTION2
(
6009
,
getOwnNodeId
()
!=
c_masterNodeId
);
SubCreateReq
*
sumaReq
=
(
SubCreateReq
*
)
signal
->
getDataPtrSend
();
SubCreateReq
*
sumaReq
=
(
SubCreateReq
*
)
signal
->
getDataPtrSend
();
sumaReq
->
senderRef
=
reference
();
// reference to DICT
sumaReq
->
senderRef
=
reference
();
// reference to DICT
...
@@ -10105,6 +10111,8 @@ busy:
...
@@ -10105,6 +10111,8 @@ busy:
*/
*/
ndbrequire
(
refToBlock
(
origSenderRef
)
==
DBDICT
);
ndbrequire
(
refToBlock
(
origSenderRef
)
==
DBDICT
);
CRASH_INSERTION
(
6007
);
{
{
SubStartReq
*
req
=
(
SubStartReq
*
)
signal
->
getDataPtrSend
();
SubStartReq
*
req
=
(
SubStartReq
*
)
signal
->
getDataPtrSend
();
...
@@ -10334,6 +10342,9 @@ busy:
...
@@ -10334,6 +10342,9 @@ busy:
ndbout_c
(
"SUB_STOP_REQ 2"
);
ndbout_c
(
"SUB_STOP_REQ 2"
);
#endif
#endif
ndbrequire
(
refToBlock
(
origSenderRef
)
==
DBDICT
);
ndbrequire
(
refToBlock
(
origSenderRef
)
==
DBDICT
);
CRASH_INSERTION
(
6008
);
{
{
SubStopReq
*
req
=
(
SubStopReq
*
)
signal
->
getDataPtrSend
();
SubStopReq
*
req
=
(
SubStopReq
*
)
signal
->
getDataPtrSend
();
...
@@ -10659,6 +10670,8 @@ Dbdict::execSUB_REMOVE_REQ(Signal* signal)
...
@@ -10659,6 +10670,8 @@ Dbdict::execSUB_REMOVE_REQ(Signal* signal)
subbPtr
.
p
->
m_errorCode
=
0
;
subbPtr
.
p
->
m_errorCode
=
0
;
}
}
CRASH_INSERTION2
(
6010
,
getOwnNodeId
()
!=
c_masterNodeId
);
SubRemoveReq
*
req
=
(
SubRemoveReq
*
)
signal
->
getDataPtrSend
();
SubRemoveReq
*
req
=
(
SubRemoveReq
*
)
signal
->
getDataPtrSend
();
req
->
senderRef
=
reference
();
req
->
senderRef
=
reference
();
req
->
senderData
=
subbPtr
.
i
;
req
->
senderData
=
subbPtr
.
i
;
...
@@ -13738,6 +13751,15 @@ Dbdict::checkDictLockQueue(Signal* signal, bool poll)
...
@@ -13738,6 +13751,15 @@ Dbdict::checkDictLockQueue(Signal* signal, bool poll)
break
;
break
;
}
}
if
(
c_blockState
!=
BS_IDLE
)
{
/**
* If state is BS_NODE_FAILURE, it might be that no op is running
*/
jam
();
break
;
}
ndbrequire
(
c_blockState
==
BS_IDLE
);
ndbrequire
(
c_blockState
==
BS_IDLE
);
lockPtr
.
p
->
locked
=
true
;
lockPtr
.
p
->
locked
=
true
;
c_blockState
=
lockPtr
.
p
->
lt
->
blockState
;
c_blockState
=
lockPtr
.
p
->
lt
->
blockState
;
...
...
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
View file @
7a0179e1
...
@@ -2041,10 +2041,10 @@ private:
...
@@ -2041,10 +2041,10 @@ private:
KeyTable2
<
OpDropIndex
,
OpRecordUnion
>
c_opDropIndex
;
KeyTable2
<
OpDropIndex
,
OpRecordUnion
>
c_opDropIndex
;
KeyTable2
<
OpAlterIndex
,
OpRecordUnion
>
c_opAlterIndex
;
KeyTable2
<
OpAlterIndex
,
OpRecordUnion
>
c_opAlterIndex
;
KeyTable2
<
OpBuildIndex
,
OpRecordUnion
>
c_opBuildIndex
;
KeyTable2
<
OpBuildIndex
,
OpRecordUnion
>
c_opBuildIndex
;
KeyTable2
<
OpCreateEvent
,
OpRecordUnion
>
c_opCreateEvent
;
KeyTable2
C
<
OpCreateEvent
,
OpRecordUnion
>
c_opCreateEvent
;
KeyTable2
<
OpSubEvent
,
OpRecordUnion
>
c_opSubEvent
;
KeyTable2
C
<
OpSubEvent
,
OpRecordUnion
>
c_opSubEvent
;
KeyTable2
<
OpDropEvent
,
OpRecordUnion
>
c_opDropEvent
;
KeyTable2
C
<
OpDropEvent
,
OpRecordUnion
>
c_opDropEvent
;
KeyTable2
<
OpSignalUtil
,
OpRecordUnion
>
c_opSignalUtil
;
KeyTable2
C
<
OpSignalUtil
,
OpRecordUnion
>
c_opSignalUtil
;
KeyTable2
<
OpCreateTrigger
,
OpRecordUnion
>
c_opCreateTrigger
;
KeyTable2
<
OpCreateTrigger
,
OpRecordUnion
>
c_opCreateTrigger
;
KeyTable2
<
OpDropTrigger
,
OpRecordUnion
>
c_opDropTrigger
;
KeyTable2
<
OpDropTrigger
,
OpRecordUnion
>
c_opDropTrigger
;
KeyTable2
<
OpAlterTrigger
,
OpRecordUnion
>
c_opAlterTrigger
;
KeyTable2
<
OpAlterTrigger
,
OpRecordUnion
>
c_opAlterTrigger
;
...
...
storage/ndb/src/kernel/vm/KeyTable2.hpp
View file @
7a0179e1
...
@@ -40,4 +40,76 @@ public:
...
@@ -40,4 +40,76 @@ public:
}
}
};
};
template
<
class
T
,
class
U
>
class
KeyTable2C
:
public
KeyTable2
<
T
,
U
>
{
Uint32
m_count
;
public:
KeyTable2C
(
ArrayPool
<
U
>&
pool
)
:
KeyTable2
<
T
,
U
>
(
pool
),
m_count
(
0
)
{
}
Uint32
get_count
()
const
{
return
m_count
;
}
bool
seize
(
Ptr
<
T
>
&
ptr
)
{
if
(
KeyTable2
<
T
,
U
>::
seize
(
ptr
))
{
m_count
++
;
return
true
;
}
return
false
;
}
void
add
(
Ptr
<
T
>
&
ptr
)
{
KeyTable2
<
T
,
U
>::
add
(
ptr
);
m_count
++
;
}
void
remove
(
Ptr
<
T
>
&
ptr
,
const
T
&
key
)
{
KeyTable2
<
T
,
U
>::
remove
(
ptr
,
key
);
if
(
ptr
.
i
!=
RNIL
)
{
assert
(
m_count
);
m_count
--
;
}
}
void
remove
(
Uint32
i
)
{
KeyTable2
<
T
,
U
>::
remove
(
i
);
assert
(
m_count
);
m_count
--
;
}
void
remove
(
Ptr
<
T
>
&
ptr
)
{
KeyTable2
<
T
,
U
>::
remove
(
ptr
);
assert
(
m_count
);
m_count
--
;
}
void
removeAll
()
{
KeyTable2
<
T
,
U
>::
removeAll
();
m_count
=
0
;
}
void
release
(
Ptr
<
T
>
&
ptr
,
const
T
&
key
)
{
KeyTable2
<
T
,
U
>::
release
(
ptr
,
key
);
if
(
ptr
.
i
!=
RNIL
)
{
assert
(
m_count
);
m_count
--
;
}
}
void
release
(
Uint32
i
)
{
KeyTable2
<
T
,
U
>::
release
(
i
);
assert
(
m_count
);
m_count
--
;
}
void
release
(
Ptr
<
T
>
&
ptr
)
{
KeyTable2
<
T
,
U
>::
release
(
ptr
);
assert
(
m_count
);
m_count
--
;
}
};
#endif
#endif
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