summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-12-11 16:04:33 +0100
committerunknown <tomas@whalegate.ndb.mysql.com>2007-12-11 16:04:33 +0100
commit8e6e313c3622271981911031528509746f1a68e3 (patch)
tree34f7a02a4befe50809f6b172278793c57817065d
parent481385de3afda8eca59d982afdc69f42c5349fb9 (diff)
downloadmariadb-git-8e6e313c3622271981911031528509746f1a68e3.tar.gz
bug#33142: access after free() for blob replication and online alter table
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index a82983fca8c..dff953923fe 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -792,6 +792,18 @@ NdbEventOperationImpl::receive_event()
p = p->next();
}
}
+ // change the blobHandle's to refer to the new table object.
+ NdbBlob *p = theBlobList;
+ while (p)
+ {
+ int no = p->getColumn()->getColumnNo();
+ NdbColumnImpl *tAttrInfo = at->getColumn(no);
+ DBUG_PRINT("info", ("blob_handle: 0x%lx "
+ "switching column impl 0x%lx -> 0x%lx",
+ (long) p, (long) p->theColumn, (long) tAttrInfo));
+ p->theColumn = tAttrInfo;
+ p = p->next();
+ }
if (tmp_table_impl)
delete tmp_table_impl;
}