mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Removed getTableForAlteration
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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");
|
||||
|
@ -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());
|
||||
|
Reference in New Issue
Block a user