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
a84d2971
Commit
a84d2971
authored
May 09, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
parents
73306167
ef1fdd30
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
7 deletions
+49
-7
storage/ndb/include/ndbapi/NdbRecAttr.hpp
storage/ndb/include/ndbapi/NdbRecAttr.hpp
+30
-2
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
+10
-0
storage/ndb/src/ndbapi/ClusterMgr.cpp
storage/ndb/src/ndbapi/ClusterMgr.cpp
+4
-2
storage/ndb/src/ndbapi/ClusterMgr.hpp
storage/ndb/src/ndbapi/ClusterMgr.hpp
+2
-0
storage/ndb/src/ndbapi/NdbRecAttr.cpp
storage/ndb/src/ndbapi/NdbRecAttr.cpp
+3
-3
No files found.
storage/ndb/include/ndbapi/NdbRecAttr.hpp
View file @
a84d2971
...
...
@@ -148,7 +148,14 @@ public:
*
* @return Char value.
*/
Int8
char_value
()
const
;
char
char_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
*
* @return Int8 value.
*/
Int8
int8_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
...
...
@@ -185,6 +192,13 @@ public:
*/
Uint8
u_char_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
*
* @return Uint8 value.
*/
Uint8
u_8_value
()
const
;
/**
* Get value stored in NdbRecAttr object.
*
...
...
@@ -309,8 +323,15 @@ NdbRecAttr::short_value() const
}
inline
Int8
char
NdbRecAttr
::
char_value
()
const
{
return
*
(
char
*
)
theRef
;
}
inline
Int8
NdbRecAttr
::
int8_value
()
const
{
return
*
(
Int8
*
)
theRef
;
}
...
...
@@ -336,6 +357,13 @@ NdbRecAttr::u_char_value() const
return
*
(
Uint8
*
)
theRef
;
}
inline
Uint8
NdbRecAttr
::
u_8_value
()
const
{
return
*
(
Uint8
*
)
theRef
;
}
inline
void
NdbRecAttr
::
release
()
...
...
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
a84d2971
...
...
@@ -628,6 +628,16 @@ MgmtSrvr::start(BaseString &error_string)
ndbout_c
(
"This is probably a bug."
);
}
/*
set api reg req frequency quite high:
100 ms interval to make sure we have fairly up-to-date
info from the nodes. This to make sure that this info
is not dependent on heart beat settings in the
configuration
*/
theFacade
->
theClusterMgr
->
set_max_api_reg_req_interval
(
100
);
TransporterRegistry
*
reg
=
theFacade
->
get_registry
();
for
(
unsigned
int
i
=
0
;
i
<
reg
->
m_transporter_interface
.
size
();
i
++
)
{
BaseString
msg
;
...
...
storage/ndb/src/ndbapi/ClusterMgr.cpp
View file @
a84d2971
...
...
@@ -61,6 +61,7 @@ ClusterMgr::ClusterMgr(TransporterFacade & _facade):
clusterMgrThreadMutex
=
NdbMutex_Create
();
waitForHBCond
=
NdbCondition_Create
();
waitingForHB
=
false
;
m_max_api_reg_req_interval
=
0xFFFFFFFF
;
// MAX_INT
noOfAliveNodes
=
0
;
noOfConnectedNodes
=
0
;
theClusterMgrThread
=
0
;
...
...
@@ -243,7 +244,7 @@ ClusterMgr::threadMain( ){
}
theFacade
.
lock_mutex
();
for
(
int
i
=
1
;
i
<
MAX_NODES
;
i
++
){
for
(
int
i
=
1
;
i
<
MAX_N
DB_N
ODES
;
i
++
){
/**
* Send register request (heartbeat) to all available nodes
* at specified timing intervals
...
...
@@ -264,7 +265,8 @@ ClusterMgr::threadMain( ){
}
theNode
.
hbCounter
+=
timeSlept
;
if
(
theNode
.
hbCounter
>=
theNode
.
hbFrequency
)
{
if
(
theNode
.
hbCounter
>=
m_max_api_reg_req_interval
||
theNode
.
hbCounter
>=
theNode
.
hbFrequency
)
{
/**
* It is now time to send a new Heartbeat
*/
...
...
storage/ndb/src/ndbapi/ClusterMgr.hpp
View file @
a84d2971
...
...
@@ -50,6 +50,7 @@ public:
void
startThread
();
void
forceHB
();
void
set_max_api_reg_req_interval
(
unsigned
int
millisec
)
{
m_max_api_reg_req_interval
=
millisec
;
}
private:
void
threadMain
();
...
...
@@ -89,6 +90,7 @@ public:
Uint32
m_connect_count
;
private:
Uint32
m_max_api_reg_req_interval
;
Uint32
noOfAliveNodes
;
Uint32
noOfConnectedNodes
;
Node
theNodes
[
MAX_NODES
];
...
...
storage/ndb/src/ndbapi/NdbRecAttr.cpp
View file @
a84d2971
...
...
@@ -270,7 +270,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
out
<<
r
.
u_short_value
();
break
;
case
NdbDictionary
:
:
Column
::
Tinyunsigned
:
out
<<
(
unsigned
)
r
.
u_
char
_value
();
out
<<
(
unsigned
)
r
.
u_
8
_value
();
break
;
case
NdbDictionary
:
:
Column
::
Bigint
:
out
<<
r
.
int64_value
();
...
...
@@ -285,7 +285,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
out
<<
r
.
short_value
();
break
;
case
NdbDictionary
:
:
Column
::
Tinyint
:
out
<<
(
int
)
r
.
char
_value
();
out
<<
(
int
)
r
.
int8
_value
();
break
;
case
NdbDictionary
:
:
Column
::
Binary
:
if
(
!
f
.
hex_format
)
...
...
@@ -411,7 +411,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
break
;
case
NdbDictionary
:
:
Column
::
Year
:
{
uint
year
=
1900
+
r
.
u_
char
_value
();
uint
year
=
1900
+
r
.
u_
8
_value
();
char
buf
[
40
];
sprintf
(
buf
,
"%04d"
,
year
);
out
<<
buf
;
...
...
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