summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <pekka@mysql.com>2006-02-21 02:27:23 +0100
committerunknown <pekka@mysql.com>2006-02-21 02:27:23 +0100
commit449cc2400b2a2ceab479c2e30aad21e1b800eebc (patch)
treeb9aa936e29987fdc6c09631491453ddc7359bfef /storage
parentde83767bd022fecc59ab6705f7bd240a015a729c (diff)
downloadmariadb-git-449cc2400b2a2ceab479c2e30aad21e1b800eebc.tar.gz
ndb - fix event created by ndb_restore bug#17045 (not really)
mysql-test/t/disabled.def: leave ndb_dd_backuprestore disabled until *.result corrected storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: error code was clobbered storage/ndb/tools/restore/consumer_restore.cpp: surprise - ndb_restore creates events
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp4
-rw-r--r--storage/ndb/tools/restore/consumer_restore.cpp7
2 files changed, 8 insertions, 3 deletions
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index 411c151410d..5b2bc99dd18 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -350,10 +350,8 @@ NdbEventOperationImpl::getBlobHandle(const NdbColumnImpl *tAttrInfo, int n)
// to hide blob op it is linked under main op, not under m_ndb
NdbEventOperation* tmp =
m_ndb->theEventBuffer->createEventOperation(bename, m_error);
- if (tmp == NULL) {
- m_error.code = m_ndb->theEventBuffer->m_error.code;
+ if (tmp == NULL)
DBUG_RETURN(NULL);
- }
tBlobOp = &tmp->m_impl;
// pointer to main table op
diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp
index e4d8f98363a..3b39a1373a0 100644
--- a/storage/ndb/tools/restore/consumer_restore.cpp
+++ b/storage/ndb/tools/restore/consumer_restore.cpp
@@ -748,10 +748,17 @@ BackupRestore::table(const TableS & table){
my_event.addTableEvent(NdbDictionary::Event::TE_ALL);
// add all columns to the event
+ bool has_blobs = false;
for(int a= 0; a < tab->getNoOfColumns(); a++)
{
my_event.addEventColumn(a);
+ NdbDictionary::Column::Type t = tab->getColumn(a)->getType();
+ if (t == NdbDictionary::Column::Blob ||
+ t == NdbDictionary::Column::Text)
+ has_blobs = true;
}
+ if (has_blobs)
+ my_event.mergeEvents(true);
while ( dict->createEvent(my_event) ) // Add event to database
{