diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-01-14 12:32:33 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-01-14 12:32:33 +0100 |
commit | 9d9d7582084212fa85355cc1dad850b231d9c876 (patch) | |
tree | 935c456444b83f0e9e42f74d6025351b14f240fa /ndb | |
parent | e1e34b516cff8b17896b9da0c3b11c3987527ef1 (diff) | |
download | mariadb-git-9d9d7582084212fa85355cc1dad850b231d9c876.tar.gz |
added support for 'show status like 'Ndb%''
added number_of_replicas printout in show table status
mysql-test/r/ndb_alter_table.result:
added number_of_replicas to show table status printout
mysql-test/r/ndb_autodiscover.result:
added number_of_replicas to show table status printout
ndb/include/ndbapi/NdbDictionary.hpp:
added get method for replica count
ndb/include/ndbapi/ndb_cluster_connection.hpp:
added get method of node id
ndb/src/ndbapi/NdbDictionary.cpp:
added get method for replica count
ndb/src/ndbapi/ndb_cluster_connection.cpp:
added get method of node id
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/include/ndbapi/NdbDictionary.hpp | 2 | ||||
-rw-r--r-- | ndb/include/ndbapi/ndb_cluster_connection.hpp | 1 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbDictionary.cpp | 5 | ||||
-rw-r--r-- | ndb/src/ndbapi/ndb_cluster_connection.cpp | 6 |
4 files changed, 14 insertions, 0 deletions
diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp index 32c75227c83..19319c54ea1 100644 --- a/ndb/include/ndbapi/NdbDictionary.hpp +++ b/ndb/include/ndbapi/NdbDictionary.hpp @@ -715,6 +715,8 @@ public: int getRowSizeInBytes() const ; int createTableInDb(Ndb*, bool existingEqualIsOk = true) const ; + + int getReplicaCount() const ; #endif private: diff --git a/ndb/include/ndbapi/ndb_cluster_connection.hpp b/ndb/include/ndbapi/ndb_cluster_connection.hpp index 2b59ff1a055..97db76563aa 100644 --- a/ndb/include/ndbapi/ndb_cluster_connection.hpp +++ b/ndb/include/ndbapi/ndb_cluster_connection.hpp @@ -86,6 +86,7 @@ public: void set_optimized_node_selection(int val); unsigned no_db_nodes(); + unsigned node_id(); #endif private: diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp index 73510e630dc..42ccda5176a 100644 --- a/ndb/src/ndbapi/NdbDictionary.cpp +++ b/ndb/src/ndbapi/NdbDictionary.cpp @@ -433,6 +433,11 @@ NdbDictionary::Table::getRowSizeInBytes() const { } int +NdbDictionary::Table::getReplicaCount() const { + return m_impl.m_replicaCount; +} + +int NdbDictionary::Table::createTableInDb(Ndb* pNdb, bool equalOk) const { const NdbDictionary::Table * pTab = pNdb->getDictionary()->getTable(getName()); diff --git a/ndb/src/ndbapi/ndb_cluster_connection.cpp b/ndb/src/ndbapi/ndb_cluster_connection.cpp index 2b3743e013a..aefcb0d97d0 100644 --- a/ndb/src/ndbapi/ndb_cluster_connection.cpp +++ b/ndb/src/ndbapi/ndb_cluster_connection.cpp @@ -183,6 +183,12 @@ Ndb_cluster_connection::no_db_nodes() return m_impl.m_all_nodes.size(); } +unsigned +Ndb_cluster_connection::node_id() +{ + return m_impl.m_transporter_facade->ownId(); +} + int Ndb_cluster_connection::wait_until_ready(int timeout, |