Skip to content

Commit 86c868d

Browse files
committed
Bug#35709497 C header files mgmapi.h and ndb_version.h requires C++
Make mgmapi.h C-compilable again: - remove ndb_mgm_cluster_state2::init method which should not be used anyway. - add missing struct for struct types. Make ndb_version.h C-compilable again: - include <stdbool.h> for type bool. Change-Id: Id691d469d7c0a596cd2f09e6f096468a29fc45f6
1 parent 8ffdbb0 commit 86c868d

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

storage/ndb/include/mgmapi/mgmapi.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,6 @@ extern "C" {
323323
INET6_ADDRSTRLEN
324324
#endif
325325
];
326-
327-
void init();
328326
};
329327

330328
/**
@@ -793,7 +791,7 @@ extern "C" {
793791
* @return Node state of cs at position i
794792
*/
795793
struct ndb_mgm_node_state2 *
796-
ndb_mgm_get_node_status(ndb_mgm_cluster_state2 *cs, int i);
794+
ndb_mgm_get_node_status(struct ndb_mgm_cluster_state2 *cs, int i);
797795

798796
/**
799797
* Get the number of nodes in a cluster state
@@ -802,7 +800,7 @@ extern "C" {
802800
* @return Number of nodes in the cluster state
803801
*/
804802
int
805-
ndb_mgm_get_status_node_count(ndb_mgm_cluster_state2 *cs);
803+
ndb_mgm_get_status_node_count(struct ndb_mgm_cluster_state2 *cs);
806804

807805
/**
808806
* Dump state

storage/ndb/include/ndb_version.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#ifndef NDB_VERSION_H
2626
#define NDB_VERSION_H
2727

28+
#include <stdbool.h>
2829
#include <ndb_types.h>
2930
#include <mysql_version.h>
3031

storage/ndb/src/mgmapi/mgmapi.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,22 +1468,6 @@ ndb_mgm_get_status_node_count(ndb_mgm_cluster_state2 *cs)
14681468
return cs->no_of_nodes;
14691469
}
14701470

1471-
void
1472-
ndb_mgm_node_state2::init()
1473-
{
1474-
node_id = 0;
1475-
node_type = NDB_MGM_NODE_TYPE_UNKNOWN;
1476-
node_status = NDB_MGM_NODE_STATUS_UNKNOWN;
1477-
start_phase = 0;
1478-
dynamic_id = 0;
1479-
node_group = 0;
1480-
version = 0;
1481-
connect_count = 0;
1482-
mysql_version = 0;
1483-
is_single_user = 0;
1484-
memset(connect_address, 0, sizeof(connect_address));
1485-
}
1486-
14871471
extern "C"
14881472
struct ndb_mgm_cluster_state2 *
14891473
ndb_mgm_get_status3(NdbMgmHandle handle, const enum ndb_mgm_node_type types[])

0 commit comments

Comments
 (0)