Commit 53b25202 authored by mskold/marty@linux.site's avatar mskold/marty@linux.site

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb

into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
parents 633b32f4 3c36b92a
......@@ -4844,9 +4844,9 @@ int ha_ndbcluster::create(const char *name,
if (info->storage_media == HA_SM_DISK)
{
if (info->tablespace)
tab.setTablespace(info->tablespace);
tab.setTablespaceName(info->tablespace);
else
tab.setTablespace("DEFAULT-TS");
tab.setTablespaceName("DEFAULT-TS");
}
else if (info->tablespace)
{
......@@ -4860,7 +4860,7 @@ int ha_ndbcluster::create(const char *name,
"STORAGE DISK");
DBUG_RETURN(HA_ERR_UNSUPPORTED);
}
tab.setTablespace(info->tablespace);
tab.setTablespaceName(info->tablespace);
info->storage_media = HA_SM_DISK; //if use tablespace, that also means store on disk
}
......
......@@ -809,9 +809,9 @@ public:
*/
void setMaxLoadFactor(int);
void setTablespace(const char * name);
void setTablespaceName(const char * name);
const char * getTablespaceName() const;
void setTablespace(const class Tablespace &);
const char * getTablespace() const;
bool getTablespace(Uint32 *id= 0, Uint32 *version= 0) const;
/**
......
......@@ -663,8 +663,14 @@ NdbDictionary::Table::getTablespace(Uint32 *id, Uint32 *version) const
return true;
}
const char *
NdbDictionary::Table::getTablespaceName() const
{
return m_impl.m_tablespace_name.c_str();
}
void
NdbDictionary::Table::setTablespace(const char * name){
NdbDictionary::Table::setTablespaceName(const char * name){
m_impl.m_tablespace_id = ~0;
m_impl.m_tablespace_version = ~0;
m_impl.m_tablespace_name.assign(name);
......
......@@ -163,7 +163,7 @@ int Bank::createTable(const char* tabName, bool disk){
return NDBT_FAILED;
}
NdbDictionary::Table copy(* pTab);
copy.setTablespace("DEFAULT-TS");
copy.setTablespaceName("DEFAULT-TS");
for (Uint32 i = 0; i<copy.getNoOfColumns(); i++)
copy.getColumn(i)->setStorageType(NdbDictionary::Column::StorageTypeDisk);
if(m_ndb.getDictionary()->createTable(copy) == -1){
......
......@@ -37,7 +37,7 @@ g_create_hook(Ndb* ndb, NdbDictionary::Table& tab, int when, void* arg)
}
}
if (g_tsname != NULL) {
tab.setTablespace(g_tsname);
tab.setTablespaceName(g_tsname);
}
}
return 0;
......
......@@ -1643,7 +1643,7 @@ runCreateDiskTable(NDBT_Context* ctx, NDBT_Step* step){
Ndb* pNdb = GETNDB(step);
NdbDictionary::Table tab = *ctx->getTab();
tab.setTablespace("DEFAULT-TS");
tab.setTablespaceName("DEFAULT-TS");
for(Uint32 i = 0; i<tab.getNoOfColumns(); i++)
if(!tab.getColumn(i)->getPrimaryKey())
......
......@@ -969,7 +969,7 @@ NDBT_TestSuite::createHook(Ndb* ndb, NdbDictionary::Table& tab, int when)
}
if (tsname != NULL) {
tab.setTablespace(tsname);
tab.setTablespaceName(tsname);
}
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment