Skip to content

Commit 975f29e

Browse files
committed
wl#9819 patch #10: New function ndb_mgm_get_name() in mgm api
1 parent a147b8b commit 975f29e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

storage/ndb/include/mgmapi/mgmapi.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -410,6 +410,11 @@ extern "C" {
410410
*/
411411
void ndb_mgm_set_name(NdbMgmHandle handle, const char *name);
412412

413+
/** Get the name previously set for the handle
414+
*
415+
*/
416+
const char * ndb_mgm_get_name(const NdbMgmHandle handle);
417+
413418
/**
414419
* Set 'ignore_sigpipe' behaviour
415420
*

storage/ndb/src/mgmapi/mgmapi.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ ndb_mgm_set_name(NdbMgmHandle handle, const char *name)
271271
handle->m_name= strdup(name);
272272
}
273273

274+
extern "C"
275+
const char *
276+
ndb_mgm_get_name(const NdbMgmHandle handle)
277+
{
278+
return handle->m_name;
279+
}
280+
274281
extern "C"
275282
int
276283
ndb_mgm_set_connectstring(NdbMgmHandle handle, const char* connect_string)

0 commit comments

Comments
 (0)