Browse Source

Merge remote-tracking branch 'origin/candidate-3.8.2' into candidate-3.8.x

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 years ago
parent
commit
e04d5e9818

+ 2 - 1
esp/files/ECLPlayground.js

@@ -155,7 +155,8 @@ define([
 			},
 
 			initTargets = function () {
-				var base = new ESPBase();
+				var base = new ESPBase({
+				});
 				var request = {
 					rawxml_: true
 				};

+ 3 - 0
thorlcr/activities/indexwrite/thindexwriteslave.cpp

@@ -168,6 +168,9 @@ public:
         }
         assertex(!(helper->queryDiskRecordSize()->getMetaFlags() & MDFneedserialize));
         maxDiskRecordSize = helper->queryDiskRecordSize()->isVariableSize() ? KEYBUILD_MAXLENGTH : helper->queryDiskRecordSize()->getFixedSize();
+        // NB: the max [ecl] length is not used, other than setting a max field in the header.
+        // However, legacy systems (<=702) check that query rec length == key rec len.
+        maxDiskRecordSize = helper->queryDiskRecordSize()->getRecordSize(NULL);
         reportOverflow = false;
     }
 

+ 4 - 3
thorlcr/thorutil/thmem.cpp

@@ -582,12 +582,13 @@ void CThorExpandingRowArray::removeRows(rowidx_t start, rowidx_t n)
     assertex(!n || rows);
     if (rows)
     {
-        for (rowidx_t i = start; i < start+n; i++)
+        rowidx_t end = start+n;
+        for (rowidx_t i = start; i < end; i++)
             ReleaseThorRow(rows[i]);
         //firstRow = 0;
-        numRows -= n;
         const void **from = rows+start;
-        memmove(from, from+n, n * sizeof(void *));
+        memmove(from, from+n, (numRows-end) * sizeof(void *));
+        numRows -= n;
     }
 }