mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
This commit is contained in:
commit
53b252025b
7 changed files with 16 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue