summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-12-12 13:09:20 +0100
committerunknown <jonas@perch.ndb.mysql.com>2006-12-12 13:09:20 +0100
commit5a6e23bcfac47614c98552d929031901ec9fe6b5 (patch)
tree3ba1f4c8c6a5a5f1eaf6518ed3506417ae40d23c
parentbbb256769a0da1996775f4bb90597f3000c4d0ed (diff)
downloadmariadb-git-5a6e23bcfac47614c98552d929031901ec9fe6b5.tar.gz
ndb - bug#25001
make sure DISK flag is set on DATA column for blob table storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: maek sure DISK flag is set on DATA column fro blob table storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: maek sure DISK flag is set on DATA column fro blob table
-rw-r--r--storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp8
-rw-r--r--storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp2
2 files changed, 7 insertions, 3 deletions
diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index 4f6673cb468..56c6258beec 100644
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -2302,7 +2302,7 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t)
}
// blob tables - use "t2" to get values set by kernel
- if (t2->m_noOfBlobs != 0 && createBlobTables(*t2) != 0) {
+ if (t2->m_noOfBlobs != 0 && createBlobTables(t, *t2) != 0) {
int save_code = m_error.code;
(void)dropTableGlobal(*t2);
m_error.code = save_code;
@@ -2316,7 +2316,7 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t)
}
int
-NdbDictionaryImpl::createBlobTables(NdbTableImpl &t)
+NdbDictionaryImpl::createBlobTables(NdbTableImpl& orig, NdbTableImpl &t)
{
DBUG_ENTER("NdbDictionaryImpl::createBlobTables");
for (unsigned i = 0; i < t.m_columns.size(); i++) {
@@ -2325,6 +2325,10 @@ NdbDictionaryImpl::createBlobTables(NdbTableImpl &t)
continue;
NdbTableImpl bt;
NdbBlob::getBlobTable(bt, &t, &c);
+ NdbDictionary::Column::StorageType
+ d = NdbDictionary::Column::StorageTypeDisk;
+ if (orig.m_columns[i]->getStorageType() == d)
+ bt.getColumn("DATA")->setStorageType(d);
if (createTable(bt) != 0) {
DBUG_RETURN(-1);
}
diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
index e5f68cfcc81..c439a506051 100644
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
@@ -582,7 +582,7 @@ public:
bool setTransporter(class TransporterFacade * tf);
int createTable(NdbTableImpl &t);
- int createBlobTables(NdbTableImpl& t);
+ int createBlobTables(NdbTableImpl& org, NdbTableImpl& created);
int alterTable(NdbTableImpl &t);
int dropTable(const char * name);
int dropTable(NdbTableImpl &);