diff options
author | unknown <mskold@mysql.com> | 2004-12-07 10:27:22 +0100 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2004-12-07 10:27:22 +0100 |
commit | a700754e7108aa51631949f236e4cd965f7fda42 (patch) | |
tree | 6fd75132a919397db6e4a3d65ebad65672205276 | |
parent | e2d4dc23c4381b0dbb11ba3763482447c372e0f4 (diff) | |
download | mariadb-git-a700754e7108aa51631949f236e4cd965f7fda42.tar.gz |
Removed getTableForAlteration
-rw-r--r-- | ndb/include/ndbapi/NdbDictionary.hpp | 14 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbDictionary.cpp | 13 | ||||
-rw-r--r-- | ndb/test/ndbapi/testDict.cpp | 6 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 2 |
4 files changed, 4 insertions, 31 deletions
diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp index e07fc64f064..75296e919f0 100644 --- a/ndb/include/ndbapi/NdbDictionary.hpp +++ b/ndb/include/ndbapi/NdbDictionary.hpp @@ -982,20 +982,6 @@ public: */ const Table * getTable(const char * name); - /** - * Get table with given name for alteration. - * @param name Name of table to alter - * @return table if successful. NULL if undefined - */ - Table getTableForAlteration(const char * name); - - /** - * Get copy a copy of a table for alteration. - * @param table Table object to alter - * @return table if successful. NULL if undefined - */ - Table getTableForAlteration(const Table &); - #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL /** * Invalidate cached table object diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp index d1827c6895f..f88bbc907a6 100644 --- a/ndb/src/ndbapi/NdbDictionary.cpp +++ b/ndb/src/ndbapi/NdbDictionary.cpp @@ -773,19 +773,6 @@ NdbDictionary::Dictionary::removeCachedTable(const char * name){ m_impl.removeCachedObject(* t); } -NdbDictionary::Table -NdbDictionary::Dictionary::getTableForAlteration(const char * name){ - const Table * oldTable = getTable(name); - return (oldTable) ? - NdbDictionary::Table(*oldTable) - : NdbDictionary::Table(); -} - -NdbDictionary::Table -NdbDictionary::Dictionary::getTableForAlteration(const Table & tab){ - return NdbDictionary::Table(tab); -} - int NdbDictionary::Dictionary::createIndex(const Index & ind) { diff --git a/ndb/test/ndbapi/testDict.cpp b/ndb/test/ndbapi/testDict.cpp index 0a43bb02fff..5f88342705a 100644 --- a/ndb/test/ndbapi/testDict.cpp +++ b/ndb/test/ndbapi/testDict.cpp @@ -1211,7 +1211,7 @@ runTableRename(NDBT_Context* ctx, NDBT_Step* step){ const NdbDictionary::Table * oldTable = dict->getTable(pTabName.c_str()); if (oldTable) { - NdbDictionary::Table newTable = dict->getTableForAlteration(pTabName.c_str()); + NdbDictionary::Table newTable = *oldTable; newTable.setName(pTabNewName.c_str()); CHECK2(dict->alterTable(newTable) == 0, "TableRename failed"); @@ -1280,7 +1280,7 @@ runTableRenameNF(NDBT_Context* ctx, NDBT_Step* step){ const NdbDictionary::Table * oldTable = dict->getTable(pTabName.c_str()); if (oldTable) { - NdbDictionary::Table newTable = dict->getTableForAlteration(pTabName.c_str()); + NdbDictionary::Table newTable = *oldTable; newTable.setName(pTabNewName.c_str()); CHECK2(dict->alterTable(newTable) == 0, "TableRename failed"); @@ -1377,7 +1377,7 @@ runTableRenameSR(NDBT_Context* ctx, NDBT_Step* step){ const NdbDictionary::Table * oldTable = dict->getTable(pTabName.c_str()); if (oldTable) { - NdbDictionary::Table newTable = dict->getTableForAlteration(pTabName.c_str()); + NdbDictionary::Table newTable = *oldTable; newTable.setName(pTabNewName.c_str()); CHECK2(dict->alterTable(newTable) == 0, "TableRename failed"); diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 7054619fdab..775ab96d1a1 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3670,7 +3670,7 @@ int ha_ndbcluster::alter_table_name(const char *to) int ret; DBUG_ENTER("alter_table_name_table"); - NdbDictionary::Table new_tab= dict->getTableForAlteration(*orig_tab); + NdbDictionary::Table new_tab= *orig_tab; new_tab.setName(to); if (dict->alterTable(new_tab) != 0) ERR_RETURN(dict->getNdbError()); |