You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by zu...@apache.org on 2016/06/09 21:56:15 UTC

[2/6] incubator-quickstep git commit: Fixed a potential segfault with CompressedBlockBuilder.

Fixed a potential segfault with CompressedBlockBuilder.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/eebb4644
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/eebb4644
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/eebb4644

Branch: refs/heads/work-order-serialization
Commit: eebb4644f195fd82b28e77aafcf60344c33d6197
Parents: 096abe2
Author: Jianqiao Zhu <ji...@cs.wisc.edu>
Authored: Thu Jun 9 00:43:16 2016 -0500
Committer: Zuyu Zhang <zu...@apache.org>
Committed: Thu Jun 9 10:52:12 2016 -0700

----------------------------------------------------------------------
 storage/CompressedBlockBuilder.cpp | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/eebb4644/storage/CompressedBlockBuilder.cpp
----------------------------------------------------------------------
diff --git a/storage/CompressedBlockBuilder.cpp b/storage/CompressedBlockBuilder.cpp
index 4a181eb..1ca0c07 100644
--- a/storage/CompressedBlockBuilder.cpp
+++ b/storage/CompressedBlockBuilder.cpp
@@ -321,6 +321,9 @@ void CompressedBlockBuilder::buildCompressedColumnStoreTupleStorageSubBlock(void
 bool CompressedBlockBuilder::addTupleInternal(Tuple *candidate_tuple) {
   DEBUG_ASSERT(candidate_tuple->size() == relation_.size());
 
+  // Ensure that the tuple is the owner of its values.
+  candidate_tuple->ensureLiteral();
+
   // Modify dictionaries and maximum integers to reflect the new tuple's
   // values. Keep track of what has changed in case a rollback is needed.
   vector<CompressionDictionaryBuilder*> modified_dictionaries;