فهرست منبع

Merge branch 'candidate-6.4.0'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 سال پیش
والد
کامیت
4944226377
38فایلهای تغییر یافته به همراه409 افزوده شده و 226 حذف شده
  1. 13 1
      common/dllserver/dllserver.cpp
  2. 1 0
      common/dllserver/dllserver.hpp
  3. 225 165
      common/dllserver/thorplugin.cpp
  4. 2 1
      common/dllserver/thorplugin.hpp
  5. 1 1
      common/wuwebview/wuwebview.cpp
  6. 2 0
      configuration/xsds_xmls/experimental.xml
  7. 1 1
      ecl/eclcc/eclcc.cpp
  8. 11 8
      ecl/hql/hqlutil.cpp
  9. 1 1
      ecl/hql/hqlutil.hpp
  10. 1 1
      esp/bindings/http/platform/httpbinding.cpp
  11. 7 1
      esp/bindings/http/platform/httpservice.cpp
  12. 2 2
      esp/bindings/http/platform/httptransport.cpp
  13. 2 2
      esp/logging/loggingmanager/loggingmanager.cpp
  14. 2 0
      esp/platform/espcfg.cpp
  15. 3 1
      esp/platform/espcfg.ipp
  16. 33 13
      esp/platform/espcontext.cpp
  17. 2 0
      esp/platform/espcontext.hpp
  18. 8 0
      esp/platform/espp.hpp
  19. 9 4
      esp/scm/esp.ecm
  20. 6 6
      esp/services/esdl_svc_engine/esdl_binding.cpp
  21. 1 1
      esp/services/esdl_svc_engine/esdl_binding.hpp
  22. 5 5
      esp/services/ws_ecl/ws_ecl_service.cpp
  23. 2 2
      esp/services/ws_loggingservice/loggingservice.cpp
  24. 17 2
      esp/src/eclwatch/ESPWorkunit.js
  25. 14 0
      initfiles/componentfiles/configxml/esp.xsd.in
  26. 1 1
      initfiles/componentfiles/configxml/master.xml
  27. 1 1
      initfiles/componentfiles/configxml/slave.xml
  28. 1 1
      initfiles/etc/DIR_NAME/configmgr/esp.xml.in
  29. 2 0
      initfiles/etc/DIR_NAME/environment.xml.in
  30. 1 0
      plugins/cassandra/cassandrawu.cpp
  31. 5 1
      roxie/ccd/ccddali.cpp
  32. 5 1
      roxie/roxiemem/roxiemem.cpp
  33. 2 0
      system/jlib/jtime.cpp
  34. 14 0
      system/jlib/jutil.cpp
  35. 2 1
      system/jlib/jutil.hpp
  36. 2 0
      testing/regress/environment.xml.in
  37. 1 1
      thorlcr/master/thgraphmanager.cpp
  38. 1 1
      thorlcr/slave/slavmain.cpp

+ 13 - 1
common/dllserver/dllserver.cpp

@@ -493,6 +493,7 @@ public:
     virtual void getLocalLibraryName(const char * name, StringBuffer & libraryName);
     virtual DllLocationType isAvailable(const char * name);
     virtual ILoadedDllEntry * loadDll(const char * name, DllLocationType location);
+    virtual ILoadedDllEntry * loadDllResources(const char * name, DllLocationType location);
     virtual void removeDll(const char * name, bool removeDlls, bool removeDirectory);
     virtual void registerDll(const char * name, const char * kind, const char * dllPath);
     virtual IDllEntry * createEntry(IPropertyTree *owner, IPropertyTree *entry);
@@ -503,6 +504,7 @@ protected:
     void doRegisterDll(const char * name, const char * kind, const char * dllPath, const char * libPath);
     IDllLocation * getBestMatch(const char * name);
     IDllLocation * getBestMatchEx(const char * name);
+    ILoadedDllEntry * doLoadDll(const char * name, DllLocationType location, bool resourcesOnly);
 
 protected:
     StringAttr rootDir;
@@ -723,6 +725,16 @@ DllLocationType DllServer::isAvailable(const char * name)
 
 ILoadedDllEntry * DllServer::loadDll(const char * name, DllLocationType type)
 {
+    return doLoadDll(name, type, false);
+}
+
+ILoadedDllEntry * DllServer::loadDllResources(const char * name, DllLocationType type)
+{
+    return doLoadDll(name, type, true);
+}
+
+ILoadedDllEntry * DllServer::doLoadDll(const char * name, DllLocationType type, bool resourcesOnly)
+{
 #ifdef _WIN32
     if (type < DllLocationDomain)
         type = DllLocationDomain;
@@ -737,7 +749,7 @@ ILoadedDllEntry * DllServer::loadDll(const char * name, DllLocationType type)
     StringBuffer x;
     rfile.getPath(x);
     LOG(MCdebugInfo, unknownJob, "Loading dll (%s) from location %s", name, x.str());
-    return createDllEntry(x.str(), false, NULL);
+    return createDllEntry(x.str(), false, NULL, resourcesOnly);
 }
 
 void DllServer::removeDll(const char * name, bool removeDlls, bool removeDirectory)

+ 1 - 0
common/dllserver/dllserver.hpp

@@ -77,6 +77,7 @@ interface IDllServer : extends IInterface
     virtual void getLocalLibraryName(const char * name, StringBuffer & libraryName) = 0;
     virtual DllLocationType isAvailable(const char * name) = 0;
     virtual ILoadedDllEntry * loadDll(const char * name, DllLocationType location) = 0;
+    virtual ILoadedDllEntry * loadDllResources(const char * name, DllLocationType location) = 0;
     virtual void removeDll(const char * name, bool removeDlls, bool removeDirectory) = 0;
     virtual void registerDll(const char * name, const char * kind, const char * dllPath) = 0;
     virtual IDllEntry * createEntry(IPropertyTree *owner, IPropertyTree *entry) = 0;

+ 225 - 165
common/dllserver/thorplugin.cpp

@@ -66,165 +66,7 @@ const char * SimplePluginCtx::ctxQueryProp(const char *propName) const
 
 //-------------------------------------------------------------------------------------------------------------------
 
-class HelperDll : implements ILoadedDllEntry, public CInterface
-{
-    SharedObject so;
-    StringAttr name;
-    Linked<const IFileIO> dllFile;
-    bool logLoad;
-public:
-    IMPLEMENT_IINTERFACE;
-    HelperDll(const char *_name, const IFileIO *dllFile);
-    ~HelperDll();
-
-//interface ILoadedDllEntry
-    virtual HINSTANCE getInstance() const;
-    virtual void * getEntry(const char * name) const;
-    virtual bool IsShared();
-    virtual const char * queryVersion() const;
-    virtual const char * queryName() const;
-    virtual const byte * getResource(unsigned id) const;
-    virtual bool getResource(size32_t & len, const void * & data, const char * type, unsigned id, bool trace) const;
-
-    bool load(bool isGlobal, bool raiseOnError);
-    bool loadCurrentExecutable();
-    virtual void logLoaded();
-    virtual bool checkVersion(const char *expected);
-};
-
-class PluginDll : public HelperDll
-{
-    ECLPluginDefinitionBlockEx pb;
-
-public:
-    PluginDll(const char *_name, const IFileIO *_dllFile) : HelperDll(_name, _dllFile) {}
-
-    bool init(IPluginContextEx * pluginCtx);
-
-    virtual bool checkVersion(const char *expected);
-    virtual void logLoaded();
-};
-
-HelperDll::HelperDll(const char *_name, const IFileIO *_dllFile) 
-: name(_name), dllFile(_dllFile)
-{
-    logLoad = false;
-}
-
-bool HelperDll::load(bool isGlobal, bool raiseOnError)
-{
-    if (!so.load(name, isGlobal, raiseOnError))
-        return false;
-    return true;
-}
-
-bool HelperDll::loadCurrentExecutable()
-{
-    if (!so.loadCurrentExecutable())
-        return false;
-    return true;
-}
-
-HelperDll::~HelperDll()
-{
-    if (logLoad)
-        DBGLOG("Unloading dll %s", name.get());
-}
-
-HINSTANCE HelperDll::getInstance() const
-{
-    return so.getInstanceHandle();
-}
-
-void * HelperDll::getEntry(const char * name) const
-{
-    return so.getEntry(name);
-}
-
-bool HelperDll::IsShared()
-{
-    return CInterface::IsShared();
-}
-
-const char * HelperDll::queryVersion() const
-{
-    return "";
-}
-
-void HelperDll::logLoaded()
-{
-    logLoad = true;
-    DBGLOG("Loaded DLL %s", name.get());
-}
-
-bool HelperDll::checkVersion(const char *expected)
-{
-    return true;
-}
-
-const char * HelperDll::queryName() const
-{
-    return name.get();
-}
-
-const byte * HelperDll::getResource(unsigned id) const
-{
-#ifdef _WIN32
-    HINSTANCE dllHandle = so.getInstanceHandle();
-    HRSRC hrsrc = FindResource(dllHandle, MAKEINTRESOURCE(id), "BIGSTRING");
-    if (hrsrc)
-        return (const byte *) LoadResource(dllHandle, hrsrc);
-    return NULL;
-#else
-    StringBuffer resourceName;
-    resourceName.appendf("BIGSTRING_%d_txt_start", id);
-    return (const byte *) getEntry(resourceName.str());
-#endif
-}
-
-const byte resourceHeaderVersion=1;
-const size32_t resourceHeaderLength = sizeof(byte) + sizeof(byte) + sizeof(bool) + sizeof(size32_t);
-
-
-bool HelperDll::getResource(size32_t & len, const void * & data, const char * type, unsigned id, bool trace) const
-{
-#ifdef _WIN32
-    HINSTANCE dllHandle = so.getInstanceHandle();
-    HRSRC hrsrc = FindResource(dllHandle, MAKEINTRESOURCE(id), type);
-    if (!hrsrc)
-        return false;
-    len = SizeofResource(dllHandle, hrsrc);
-    data = (const byte *) LoadResource(dllHandle, hrsrc);
-    return true;
-#else
-    StringBuffer symName;
-    symName.append(type).append("_").append(id).append("_txt_start");
-    data = (const void *) getEntry(symName.str());
-    if (!data)
-    {
-        if (trace)
-            printf("Failed to locate symbol %s\n", symName.str());
-        return false;
-    }
-    byte bom;
-    byte version;
-    bool compressed;
-
-    MemoryBuffer mb;
-    mb.setBuffer(resourceHeaderLength, const_cast<void *>(data));
-    mb.read(bom);
-    if (bom!=0x80)
-        return false;
-    mb.read(version);
-    if (version>resourceHeaderVersion)
-        return false;
-    mb.read(compressed).read(len);
-    len+=resourceHeaderLength;
-    return true;
-#endif
-}
-
-static bool getResourceFromMappedFile(const char * filename, const byte * start_addr, MemoryBuffer &data, const char * type, unsigned id)
+static bool getResourceFromMappedFile(const char * filename, const byte * start_addr, size32_t & lenData, const void * & data, const char * type, unsigned id)
 {
 #if defined(_WIN32)
     throwUnexpected();
@@ -239,8 +81,8 @@ static bool getResourceFromMappedFile(const char * filename, const byte * start_
     }
 
     unsigned long len = 0;
-    unsigned char *data2 = getsectiondata(mh, "__TEXT", sectname.str(), &len);
-    data.append(len, data2);
+    data = getsectiondata(mh, "__TEXT", sectname.str(), &len);
+    lenData = (size32_t)len;
     return true;
 #elif defined (__64BIT__)
     // The first bytes are the ELF header
@@ -275,7 +117,8 @@ static bool getResourceFromMappedFile(const char * filename, const byte * start_
         const char * sectionName = symbolTable + section.sh_name;
         if (streq(sectionName, sectname))
         {
-            data.append(section.sh_size, start_addr + section.sh_offset);
+            lenData = (size32_t)section.sh_size;
+            data = start_addr + section.sh_offset;
             return true;
         }
     }
@@ -315,7 +158,8 @@ static bool getResourceFromMappedFile(const char * filename, const byte * start_
         const char * sectionName = symbolTable + section.sh_name;
         if (streq(sectionName, sectname))
         {
-            data.append(section.sh_size, start_addr + section.sh_offset);
+            lenData = (size32_t)section.sh_size;
+            data = start_addr + section.sh_offset;
             return true;
         }
     }
@@ -325,6 +169,16 @@ static bool getResourceFromMappedFile(const char * filename, const byte * start_
 #endif
 }
 
+static bool getResourceFromMappedFile(const char * filename, const byte * start_addr, MemoryBuffer & result, const char * type, unsigned id)
+{
+    size32_t len = 0;
+    const void * data = nullptr;
+    bool ok = getResourceFromMappedFile(filename, start_addr, len, data, type, id);
+    if (ok)
+        result.append(len, data);
+    return ok;
+}
+
 extern bool getResourceFromFile(const char *filename, MemoryBuffer &data, const char * type, unsigned id)
 {
 #ifdef _WIN32
@@ -379,6 +233,207 @@ extern bool getResourceFromFile(const char *filename, MemoryBuffer &data, const
 
 //-------------------------------------------------------------------------------------------------------------------
 
+class HelperDll : implements ILoadedDllEntry, public CInterface
+{
+    SharedObject so;
+    StringAttr name;
+    Linked<const IFileIO> dllFile;
+    Owned<IMemoryMappedFile> mappedDll;
+    bool logLoad;
+public:
+    IMPLEMENT_IINTERFACE;
+    HelperDll(const char *_name, const IFileIO *dllFile);
+    ~HelperDll();
+
+//interface ILoadedDllEntry
+    virtual HINSTANCE getInstance() const;
+    virtual void * getEntry(const char * name) const;
+    virtual bool IsShared();
+    virtual const char * queryVersion() const;
+    virtual const char * queryName() const;
+    virtual const byte * getResource(unsigned id) const;
+    virtual bool getResource(size32_t & len, const void * & data, const char * type, unsigned id, bool trace) const;
+
+    bool load(bool isGlobal, bool raiseOnError);
+    bool loadCurrentExecutable();
+    bool loadResources();
+
+    virtual void logLoaded();
+    virtual bool checkVersion(const char *expected);
+};
+
+class PluginDll : public HelperDll
+{
+    ECLPluginDefinitionBlockEx pb;
+
+public:
+    PluginDll(const char *_name, const IFileIO *_dllFile) : HelperDll(_name, _dllFile) {}
+
+    bool init(IPluginContextEx * pluginCtx);
+
+    virtual bool checkVersion(const char *expected);
+    virtual void logLoaded();
+};
+
+HelperDll::HelperDll(const char *_name, const IFileIO *_dllFile)
+: name(_name), dllFile(_dllFile)
+{
+    logLoad = false;
+}
+
+bool HelperDll::load(bool isGlobal, bool raiseOnError)
+{
+    if (!so.load(name, isGlobal, raiseOnError))
+        return false;
+    return true;
+}
+
+bool HelperDll::loadResources()
+{
+#ifdef _WIN32
+    return so.loadResources(name);
+#else
+    Owned<IFile> file = createIFile(name);
+    mappedDll.setown(file->openMemoryMapped());
+    return mappedDll != nullptr;
+#endif
+}
+
+bool HelperDll::loadCurrentExecutable()
+{
+    if (!so.loadCurrentExecutable())
+        return false;
+    return true;
+}
+
+HelperDll::~HelperDll()
+{
+    if (logLoad)
+        DBGLOG("Unloading dll %s", name.get());
+}
+
+HINSTANCE HelperDll::getInstance() const
+{
+    if (!so.loaded())
+        throw MakeStringException(0, "Dll %s only loaded for resources", name.str());
+    return so.getInstanceHandle();
+}
+
+void * HelperDll::getEntry(const char * entry) const
+{
+    if (!so.loaded())
+        throw MakeStringException(0, "Dll %s only loaded for resources", name.str());
+    return so.getEntry(entry);
+}
+
+bool HelperDll::IsShared()
+{
+    return CInterface::IsShared();
+}
+
+const char * HelperDll::queryVersion() const
+{
+    return "";
+}
+
+void HelperDll::logLoaded()
+{
+    logLoad = true;
+    DBGLOG("Loaded DLL %s", name.get());
+}
+
+bool HelperDll::checkVersion(const char *expected)
+{
+    return true;
+}
+
+const char * HelperDll::queryName() const
+{
+    return name.get();
+}
+
+const byte * HelperDll::getResource(unsigned id) const
+{
+    if (so.loaded())
+    {
+#ifdef _WIN32
+        HINSTANCE dllHandle = so.getInstanceHandle();
+        HRSRC hrsrc = FindResource(dllHandle, MAKEINTRESOURCE(id), "BIGSTRING");
+        if (hrsrc)
+            return (const byte *)LoadResource(dllHandle, hrsrc);
+        return NULL;
+#else
+        StringBuffer resourceName;
+        resourceName.appendf("BIGSTRING_%d_txt_start", id);
+        return (const byte *)getEntry(resourceName.str());
+#endif
+    }
+    else
+    {
+        size32_t len;
+        const void * data;
+        if (getResource(len, data, "BIGSTRING", id, false))
+            return (const byte *)data;
+        return nullptr;
+    }
+}
+
+const byte resourceHeaderVersion=1;
+const size32_t resourceHeaderLength = sizeof(byte) + sizeof(byte) + sizeof(bool) + sizeof(size32_t);
+
+
+bool HelperDll::getResource(size32_t & len, const void * & data, const char * type, unsigned id, bool trace) const
+{
+    if (so.loaded())
+    {
+#ifdef _WIN32
+        HINSTANCE dllHandle = so.getInstanceHandle();
+        HRSRC hrsrc = FindResource(dllHandle, MAKEINTRESOURCE(id), type);
+        if (!hrsrc)
+            return false;
+        len = SizeofResource(dllHandle, hrsrc);
+        data = (const byte *)LoadResource(dllHandle, hrsrc);
+        return true;
+#else
+        StringBuffer symName;
+        symName.append(type).append("_").append(id).append("_txt_start");
+        data = (const void *)getEntry(symName.str());
+        if (!data)
+        {
+            if (trace)
+                printf("Failed to locate symbol %s\n", symName.str());
+            return false;
+        }
+        byte bom;
+        byte version;
+        bool compressed;
+
+        MemoryBuffer mb;
+        mb.setBuffer(resourceHeaderLength, const_cast<void *>(data));
+        mb.read(bom);
+        if (bom != 0x80)
+            return false;
+        mb.read(version);
+        if (version > resourceHeaderVersion)
+            return false;
+        mb.read(compressed).read(len);
+        len += resourceHeaderLength;
+        return true;
+#endif
+    }
+    else
+    {
+#ifdef _WIN32
+        return false;
+#endif
+        if (!mappedDll)
+            return false;
+        return getResourceFromMappedFile(name, mappedDll->base(), len, data, type, id);
+    }
+}
+
+//-------------------------------------------------------------------------------------------------------------------
+
 bool PluginDll::init(IPluginContextEx * pluginCtx)
 {
     HINSTANCE h = getInstance();
@@ -445,10 +500,15 @@ void PluginDll::logLoaded()
     }
 }
 
-extern DLLSERVER_API ILoadedDllEntry * createDllEntry(const char *path, bool isGlobal, const IFileIO *dllFile)
+extern DLLSERVER_API ILoadedDllEntry * createDllEntry(const char *path, bool isGlobal, const IFileIO *dllFile, bool resourcesOnly)
 {
     Owned<HelperDll> result = new HelperDll(path, dllFile);
-    if (!result->load(isGlobal, true))
+    bool ok;
+    if (!resourcesOnly)
+        ok = result->load(isGlobal, true);
+    else
+        ok = result->loadResources();
+    if (!ok)
         throw MakeStringException(0, "Failed to create ILoadedDllEntry for dll %s", path);
     return result.getClear();
 }

+ 2 - 1
common/dllserver/thorplugin.hpp

@@ -33,11 +33,12 @@ interface ILoadedDllEntry : extends IInterface
     virtual bool getResource(size32_t & len, const void * & data, const char * type, unsigned id, bool trace=true) const = 0;
 };
 
-extern DLLSERVER_API ILoadedDllEntry * createDllEntry(const char *name, bool isGlobal, const IFileIO *dllFile);
+extern DLLSERVER_API ILoadedDllEntry * createDllEntry(const char *name, bool isGlobal, const IFileIO *dllFile, bool resourcesOnly);
 extern DLLSERVER_API ILoadedDllEntry * createExeDllEntry(const char *name);
 extern DLLSERVER_API bool getEmbeddedWorkUnitXML(ILoadedDllEntry *dll, StringBuffer &xml);
 extern DLLSERVER_API bool getEmbeddedManifestXML(ILoadedDllEntry *dll, StringBuffer &xml);
 extern DLLSERVER_API bool checkEmbeddedWorkUnitXML(ILoadedDllEntry *dll);
+extern DLLSERVER_API bool getResourceFromFile(const char *filename, MemoryBuffer &data, const char * type, unsigned id);
 extern DLLSERVER_API bool getResourceXMLFromFile(const char *filename, const char *type, unsigned id, StringBuffer &xml);
 extern DLLSERVER_API bool getWorkunitXMLFromFile(const char *filename, StringBuffer &xml);
 extern DLLSERVER_API bool getManifestXMLFromFile(const char *filename, StringBuffer &xml);

+ 1 - 1
common/wuwebview/wuwebview.cpp

@@ -783,7 +783,7 @@ ILoadedDllEntry *WuWebView::loadDll(bool force)
     {
         try
         {
-            dll.setown(queryDllServer().loadDll(dllname.str(), DllLocationAnywhere));
+            dll.setown(queryDllServer().loadDllResources(dllname.str(), DllLocationAnywhere));
         }
         catch (IException *e)
         {

+ 2 - 0
configuration/xsds_xmls/experimental.xml

@@ -433,6 +433,8 @@
               logLevel="1"
               logRequests="false"
               logResponses="false"
+              txSummaryLevel="1"
+              txSummaryResourceReq="false"
               maxBacklogQueueSize="200"
               maxConcurrentThreads="0"
               maxRequestEntityLength="8000000"

+ 1 - 1
ecl/eclcc/eclcc.cpp

@@ -1182,7 +1182,7 @@ void EclCC::processSingleQuery(EclCompileInstance & instance,
             gatherParseWarnings(ctx.errs, instance.query, parseCtx.orphanedWarnings);
 
             if (instance.query && !optGenerateMeta && !optEvaluateResult)
-                instance.query.setown(convertAttributeToQuery(instance.query, ctx));
+                instance.query.setown(convertAttributeToQuery(instance.query, ctx, syntaxChecking));
 
             unsigned __int64 parseTimeNs = cycle_to_nanosec(get_cycles_now() - startCycles);
             instance.stats.parseTime = (unsigned)nanoToMilli(parseTimeNs);

+ 11 - 8
ecl/hql/hqlutil.cpp

@@ -8933,7 +8933,7 @@ IHqlExpression * expandMacroDefinition(IHqlExpression * expr, HqlLookupContext &
     return parseQuery(scope, mappedContents, ctx, NULL, macroParms, true);
 }
 
-static IHqlExpression * transformAttributeToQuery(IHqlExpression * expr, HqlLookupContext & ctx)
+static IHqlExpression * transformAttributeToQuery(IHqlExpression * expr, HqlLookupContext & ctx, bool syntaxCheck)
 {
     if (expr->isMacro())
         return expandMacroDefinition(expr, ctx, true);
@@ -8969,22 +8969,25 @@ static IHqlExpression * transformAttributeToQuery(IHqlExpression * expr, HqlLook
         if (main)
             return main.getClear();
 
-        StringBuffer msg;
-        const char * name = scope->queryFullName();
-        msg.appendf("Module %s does not EXPORT an attribute main()", name ? name : "");
-        ctx.errs->reportError(HQLERR_CannotSubmitModule, msg.str(), NULL, 1, 0, 0);
-        return NULL;
+        if (!syntaxCheck)
+        {
+            StringBuffer msg;
+            const char * name = scope->queryFullName();
+            msg.appendf("Module %s does not EXPORT an attribute main()", name ? name : "");
+            ctx.errs->reportError(HQLERR_CannotSubmitModule, msg.str(), NULL, 1, 0, 0);
+            return NULL;
+        }
     }
 
     return LINK(expr);
 }
 
-IHqlExpression * convertAttributeToQuery(IHqlExpression * expr, HqlLookupContext & ctx)
+IHqlExpression * convertAttributeToQuery(IHqlExpression * expr, HqlLookupContext & ctx, bool syntaxCheck)
 {
     OwnedHqlExpr query = LINK(expr);
     loop
     {
-        OwnedHqlExpr transformed = transformAttributeToQuery(query, ctx);
+        OwnedHqlExpr transformed = transformAttributeToQuery(query, ctx, syntaxCheck);
         if (!transformed || transformed == query)
             return transformed.getClear();
         query.set(transformed);

+ 1 - 1
ecl/hql/hqlutil.hpp

@@ -697,7 +697,7 @@ extern HQL_API IPropertyTree * createArchiveAttribute(IPropertyTree * module, co
 
 extern HQL_API IError * annotateExceptionWithLocation(IException * e, IHqlExpression * location);
 extern HQL_API IHqlExpression * expandMacroDefinition(IHqlExpression * expr, HqlLookupContext & ctx, bool reportError);
-extern HQL_API IHqlExpression * convertAttributeToQuery(IHqlExpression * expr, HqlLookupContext & ctx);
+extern HQL_API IHqlExpression * convertAttributeToQuery(IHqlExpression * expr, HqlLookupContext & ctx, bool syntaxCheck);
 extern HQL_API StringBuffer & appendLocation(StringBuffer & s, IHqlExpression * location, const char * suffix = NULL);
 extern HQL_API bool userPreventsSort(IHqlExpression * noSortAttr, node_operator side);
 extern HQL_API IHqlExpression * queryTransformAssign(IHqlExpression * transform, IHqlExpression * searchField);

+ 1 - 1
esp/bindings/http/platform/httpbinding.cpp

@@ -503,7 +503,7 @@ bool EspHttpBinding::basicAuth(IEspContext* ctx)
 
     m_secmgr->updateSettings(*user,securitySettings, ctx->querySecureContext());
 
-    ctx->addTraceSummaryTimeStamp("basicAuth");
+    ctx->addTraceSummaryTimeStamp(LogMin, "basicAuth");
     return authorized;
 }
     

+ 7 - 1
esp/bindings/http/platform/httpservice.cpp

@@ -329,11 +329,17 @@ int CEspHttpServer::processRequest()
                     methodName.setCharAt(methodName.length()-1, 0);
                 if (!stricmp(methodName.str(), "files"))
                 {
+                    if (!getTxSummaryResourceReq())
+                        ctx->cancelTxSummary();
                     checkInitEclIdeResponse(m_request, m_response);
                     return onGetFile(m_request.get(), m_response.get(), pathEx.str());
                 }
                 else if (!stricmp(methodName.str(), "xslt"))
+                {
+                    if (!getTxSummaryResourceReq())
+                        ctx->cancelTxSummary();
                     return onGetXslt(m_request.get(), m_response.get(), pathEx.str());
+                }
                 else if (!stricmp(methodName.str(), "body"))
                     return onGetMainWindow(m_request.get(), m_response.get());
                 else if (!stricmp(methodName.str(), "frame"))
@@ -490,7 +496,7 @@ int CEspHttpServer::processRequest()
                 else
                     unsupported();
             }
-            ctx->addTraceSummaryTimeStamp("handleHttp");
+            ctx->addTraceSummaryTimeStamp(LogMin, "handleHttp");
         }
     }
     catch(IEspHttpException* e)

+ 2 - 2
esp/bindings/http/platform/httptransport.cpp

@@ -615,7 +615,7 @@ int CHttpMessage::receive(bool alwaysReadContent, IMultiException *me)
     if (isUpload())
         return 0;
 
-    m_context->addTraceSummaryValue("contLen", m_content_length);
+    m_context->addTraceSummaryValue(LogMin, "contLen", m_content_length);
     if(m_content_length > 0)
     {
         readContent();
@@ -1670,7 +1670,7 @@ int CHttpRequest::receive(IMultiException *me)
         }
     }
 
-    m_context->addTraceSummaryTimeStamp("rcv");
+    m_context->addTraceSummaryTimeStamp(LogMin, "rcv");
     return 0;
 }
 

+ 2 - 2
esp/logging/loggingmanager/loggingmanager.cpp

@@ -165,7 +165,7 @@ bool CLoggingManager::updateLog(IEspContext& espContext, IEspUpdateLogRequestWra
     bool bRet = false;
     try
     {
-        espContext.addTraceSummaryTimeStamp("LMgr:startQLog");
+        espContext.addTraceSummaryTimeStamp(LogMin, "LMgr:startQLog");
         for (unsigned int x = 0; x < loggingAgentThreads.size(); x++)
         {
             IUpdateLogThread* loggingThread = loggingAgentThreads[x];
@@ -175,7 +175,7 @@ bool CLoggingManager::updateLog(IEspContext& espContext, IEspUpdateLogRequestWra
                 bRet = true;
             }
         }
-        espContext.addTraceSummaryTimeStamp("LMgr:endQLog");
+        espContext.addTraceSummaryTimeStamp(LogMin, "LMgr:endQLog");
     }
     catch (IException* e)
     {

+ 2 - 0
esp/platform/espcfg.cpp

@@ -135,6 +135,8 @@ CEspConfig::CEspConfig(IProperties* inputs, IPropertyTree* envpt, IPropertyTree*
     m_options.logLevel = level ? atoi(level) : LogMin;
     m_options.logReq = m_cfg->getPropBool("@logRequests", true);
     m_options.logResp = m_cfg->getPropBool("@logResponses", false);
+    m_options.txSummaryLevel = m_cfg->getPropInt("@txSummaryLevel", LogMin);
+    m_options.txSummaryResourceReq = m_cfg->getPropBool("@txSummaryResourceReq", false);
     m_options.frameTitle.set(m_cfg->queryProp("@name"));
     m_options.slowProcessingTime = m_cfg->getPropInt("@slowProcessingTime", 30) * 1000; //in msec
 

+ 3 - 1
esp/platform/espcfg.ipp

@@ -89,10 +89,12 @@ struct esp_option
     LogLevel logLevel;
     bool logReq;
     bool logResp;
+    LogLevel txSummaryLevel;
+    bool txSummaryResourceReq;
     StringAttr frameTitle;
     unsigned slowProcessingTime; //default 30 seconds
 
-    esp_option() : logReq(false), logResp(false), logLevel(1), slowProcessingTime(30000)
+    esp_option() : logReq(false), logResp(false), logLevel(LogMin), txSummaryLevel(LogMin), txSummaryResourceReq(false), slowProcessingTime(30000)
     { }
 };
 

+ 33 - 13
esp/platform/espcontext.cpp

@@ -445,40 +445,46 @@ public:
         return m_txSummary.get();
     }
 
-    virtual void addTraceSummaryValue(const char *name, const char *value)
+    virtual void addTraceSummaryValue(LogLevel logLevel, const char *name, const char *value)
     {
-        if (m_txSummary)
+        if (m_txSummary && (getTxSummaryLevel() >= logLevel))
             m_txSummary->append(name, value);
     }
 
-    virtual void addTraceSummaryValue(const char *name, __int64 value)
+    virtual void addTraceSummaryValue(LogLevel logLevel, const char *name, __int64 value)
     {
-        if (m_txSummary)
+        if (m_txSummary && (getTxSummaryLevel() >= logLevel))
             m_txSummary->append(name, value);
     }
 
-    virtual void addTraceSummaryTimeStamp(const char *name)
+    virtual void addTraceSummaryTimeStamp(LogLevel logLevel, const char *name)
     {
-        if (m_txSummary && name && *name)
+        if (m_txSummary && (getTxSummaryLevel() >= logLevel) && name && *name)
             m_txSummary->append(name, m_txSummary->getElapsedTime(), "ms");
     }
     virtual void flushTraceSummary()
     {
-        if (m_txSummary)
-        {
-            updateTraceSummaryHeader();
+        updateTraceSummaryHeader();
+        if (m_txSummary && (getTxSummaryLevel() >= LogMin))
             m_txSummary->append("total", m_processingTime, "ms");
-        }
     }
-    virtual void addTraceSummaryCumulativeTime(const char* name, unsigned __int64 time)
+    virtual void addTraceSummaryCumulativeTime(LogLevel logLevel, const char* name, unsigned __int64 time)
     {
-        if (m_txSummary)
+        if (m_txSummary && (getTxSummaryLevel() >= logLevel))
             m_txSummary->updateTimer(name, time);
     }
     virtual CumulativeTimer* queryTraceSummaryCumulativeTimer(const char* name)
     {
         return (m_txSummary ? m_txSummary->queryTimer(name) : NULL);
     }
+    virtual void cancelTxSummary()
+    {
+        if (!m_txSummary)
+            return;
+
+        m_txSummary->clear();
+        m_txSummary.clear();
+    }
 
     virtual ESPSerializationFormat getResponseFormat(){return respSerializationFormat;}
     virtual void setResponseFormat(ESPSerializationFormat fmt){respSerializationFormat = fmt;}
@@ -580,7 +586,7 @@ bool CEspContext::isMethodAllowed(double version, const char* optional, const ch
 
 void CEspContext::updateTraceSummaryHeader()
 {
-    if (m_txSummary)
+    if (m_txSummary && (getTxSummaryLevel() >= LogMin))
     {
         m_txSummary->set("activeReqs", m_active);
         VStringBuffer user("%s%s%s", (queryUserId() ? queryUserId() : ""), (m_peer.length() ? "@" : ""), m_peer.str());
@@ -761,6 +767,20 @@ LogLevel getEspLogLevel(IEspContext* ctx)
     return LogMin;
 }
 
+LogLevel getTxSummaryLevel()
+{
+    if (getContainer())
+        return getContainer()->getTxSummaryLevel();
+    return LogMin;
+}
+
+bool getTxSummaryResourceReq()
+{
+    if (getContainer())
+        return getContainer()->getTxSummaryResourceReq();
+    return false;
+}
+
 bool getEspLogRequests()
 {
     if (getContainer())

+ 2 - 0
esp/platform/espcontext.hpp

@@ -51,6 +51,8 @@ ESPHTTP_API LogLevel getEspLogLevel(IEspContext* );
 ESPHTTP_API LogLevel getEspLogLevel();
 ESPHTTP_API bool getEspLogRequests();
 ESPHTTP_API bool getEspLogResponses();
+ESPHTTP_API LogLevel getTxSummaryLevel();
+ESPHTTP_API bool getTxSummaryResourceReq();
 ESPHTTP_API unsigned getSlowProcessingTime();
 
 ESPHTTP_API void ESPLOG(IEspContext* ctx, LogLevel level, const char* fmt, ...) __attribute__((format(printf, 3, 4)));

+ 8 - 0
esp/platform/espp.hpp

@@ -56,6 +56,8 @@ private:
     LogLevel m_logLevel;
     bool m_logReq;
     bool m_logResp;
+    LogLevel txSummaryLevel;
+    bool txSummaryResourceReq;
     unsigned m_slowProcessingTime;
     StringAttr m_frameTitle;
     Mutex abortMutex;
@@ -76,6 +78,8 @@ public:
         m_logLevel = config->m_options.logLevel;
         m_logReq = config->m_options.logReq;
         m_logResp = config->m_options.logResp;
+        txSummaryLevel = config->m_options.txSummaryLevel;
+        txSummaryResourceReq = config->m_options.txSummaryResourceReq;
         m_slowProcessingTime = config->m_options.slowProcessingTime;
         m_frameTitle.set(config->m_options.frameTitle);
         m_SEHMappingEnabled = false;
@@ -145,10 +149,14 @@ public:
     void setLogLevel(LogLevel level) { m_logLevel = level; }
     void setLogRequests(bool logReq) { m_logReq = logReq; }
     void setLogResponses(bool logResp) { m_logResp = logResp; }
+    void setTxSummaryLevel(LogLevel level) { txSummaryLevel = level; }
+    void setTxSummaryResourceReq(bool logReq) { txSummaryResourceReq = logReq; }
 
     LogLevel getLogLevel() { return m_logLevel; }
     bool getLogRequests() { return m_logReq; }
     bool getLogResponses() { return m_logResp; }
+    LogLevel getTxSummaryLevel() { return txSummaryLevel; }
+    bool getTxSummaryResourceReq() { return txSummaryResourceReq; }
     void setFrameTitle(const char* title)  { m_frameTitle.set(title); }
     const char* getFrameTitle()  { return m_frameTitle.get(); }
     unsigned getSlowProcessingTime() { return m_slowProcessingTime; }

+ 9 - 4
esp/scm/esp.ecm

@@ -150,11 +150,12 @@ interface IEspContext : extends IInterface
     virtual void addCustomerHeader(const char* name, const char* val) = 0;
 
     virtual CTxSummary* queryTxSummary()=0;
-    virtual void addTraceSummaryValue(const char *name, const char *value)=0;
-    virtual void addTraceSummaryValue(const char *name, __int64 value)=0;
-    virtual void addTraceSummaryTimeStamp(const char *name)=0;
-    virtual void addTraceSummaryCumulativeTime(const char* name, unsigned __int64 time)=0;
+    virtual void addTraceSummaryValue(unsigned logLevel, const char *name, const char *value)=0;
+    virtual void addTraceSummaryValue(unsigned logLevel, const char *name, __int64 value)=0;
+    virtual void addTraceSummaryTimeStamp(unsigned logLevel, const char *name)=0;
+    virtual void addTraceSummaryCumulativeTime(unsigned logLevel, const char* name, unsigned __int64 time)=0;
     virtual CumulativeTimer* queryTraceSummaryCumulativeTimer(const char* name)=0;
+    virtual void cancelTxSummary()=0;
 
     virtual ESPSerializationFormat getResponseFormat()=0;
     virtual void setResponseFormat(ESPSerializationFormat fmt)=0;
@@ -186,6 +187,10 @@ interface IEspContainer : extends IInterface
     virtual void setLogRequests(bool logReq) = 0;
     virtual bool getLogResponses() = 0;
     virtual void setLogResponses(bool logResp) = 0;
+    virtual void setTxSummaryLevel(LogLevel level) = 0;
+    virtual LogLevel getTxSummaryLevel() = 0;
+    virtual bool getTxSummaryResourceReq() = 0;
+    virtual void setTxSummaryResourceReq(bool req) = 0;
     virtual void log(LogLevel level, const char*,...) __attribute__((format(printf, 3, 4))) = 0;
     virtual unsigned getSlowProcessingTime() = 0;
     virtual void setFrameTitle(const char* title) = 0;

+ 6 - 6
esp/services/esdl_svc_engine/esdl_binding.cpp

@@ -527,7 +527,7 @@ void EsdlServiceImpl::handleServiceRequest(IEspContext &context,
                                            unsigned int flags)
 {
     const char *mthName = mthdef.queryName();
-    context.addTraceSummaryValue("method", mthName);
+    context.addTraceSummaryValue(LogMin, "method", mthName);
 
     StringBuffer trxid;
     if (!m_bGenerateLocalTrxId)
@@ -954,9 +954,9 @@ void EsdlServiceImpl::sendTargetSOAP(IEspContext & context,
     ESPLOG(LogMax,"OUTGOING Request: %s", clreq.str());
     {
         EspTimeSection timing("Calling out to query");
-        context.addTraceSummaryTimeStamp("startcall");
+        context.addTraceSummaryTimeStamp(LogMin, "startcall");
         httpclient->sendRequest("POST", "text/xml", clreq, resp, status,true);
-        context.addTraceSummaryTimeStamp("endcall");
+        context.addTraceSummaryTimeStamp(LogMin, "endcall");
     }
 
     if (status.length()==0)
@@ -1361,7 +1361,7 @@ int EsdlBindingImpl::onGetInstantQuery(IEspContext &context,
                     response->send();
 
                     unsigned timetaken = msTick() - context.queryCreationTime();
-                    context.addTraceSummaryTimeStamp("respSent");
+                    context.addTraceSummaryTimeStamp(LogMin, "respSent");
 
                      m_pESDLService->esdl_log(context, *srvdef, *mthdef, tgtcfg.get(), tgtctx.get(), req_pt.get(), out.str(), logdata.str(), timetaken);
 
@@ -1621,7 +1621,7 @@ int EsdlBindingImpl::HandleSoapRequest(CHttpRequest* request,
             response->send();
 
             unsigned timetaken = msTick() - ctx->queryCreationTime();
-            ctx->addTraceSummaryTimeStamp("respSent");
+            ctx->addTraceSummaryTimeStamp(LogMin, "respSent");
 
              m_pESDLService->esdl_log(*ctx, *srvdef, *mthdef, tgtcfg.get(), tgtctx.get(), pt, baseout.str(), logdata.str(), timetaken);
 
@@ -2141,7 +2141,7 @@ int EsdlBindingImpl::getJsonTestForm(IEspContext &context, CHttpRequest* request
 void EsdlBindingImpl::handleJSONPost(CHttpRequest *request, CHttpResponse *response)
 {
     IEspContext *ctx = request->queryContext();
-    ctx->addTraceSummaryValue("Esdl Binding", "JSONPost");
+    ctx->addTraceSummaryValue(LogNormal, "Esdl Binding", "JSONPost");
 
     StringBuffer jsonresp;
 

+ 1 - 1
esp/services/esdl_svc_engine/esdl_binding.hpp

@@ -111,7 +111,7 @@ public:
 #ifdef LINK_STATICALLY  // May be useful for debugging...
             javaplugin.setown(javaembed::getEmbedContext());
 #else
-            javaPluginDll.setown(createDllEntry("javaembed", false, NULL));
+            javaPluginDll.setown(createDllEntry("javaembed", false, NULL, false));
             if (!javaPluginDll)
                 throw makeStringException(0, "Failed to load javaembed plugin");
             GetEmbedContextFunction pf = (GetEmbedContextFunction) javaPluginDll->getEntry("getEmbedContextDynamic");

+ 5 - 5
esp/services/ws_ecl/ws_ecl_service.cpp

@@ -2439,7 +2439,7 @@ int CWsEclBinding::onGet(CHttpRequest* request, CHttpResponse* response)
         }
         else if (!stricmp(methodName.str(), "proxy"))
         {
-            context->addTraceSummaryValue("wseclMode", "proxy");
+            context->addTraceSummaryValue(LogMin, "wseclMode", "proxy");
 
             StringBuffer wuid;
             StringBuffer target;
@@ -2490,7 +2490,7 @@ int CWsEclBinding::onGet(CHttpRequest* request, CHttpResponse* response)
         }
         else if (!stricmp(methodName.str(), "submit"))
         {
-            context->addTraceSummaryValue("wseclMode", "submit");
+            context->addTraceSummaryValue(LogMin, "wseclMode", "submit");
 
             StringBuffer wuid;
             StringBuffer qs;
@@ -2507,7 +2507,7 @@ int CWsEclBinding::onGet(CHttpRequest* request, CHttpResponse* response)
         }
         else if (!stricmp(methodName.str(), "xslt"))
         {
-            context->addTraceSummaryValue("wseclMode", "xslt");
+            context->addTraceSummaryValue(LogMin, "wseclMode", "xslt");
 
             StringBuffer wuid;
             StringBuffer qs;
@@ -2602,7 +2602,7 @@ void checkForXmlResponseName(StartTag &starttag, StringBuffer &respname, int &so
 void CWsEclBinding::handleJSONPost(CHttpRequest *request, CHttpResponse *response)
 {
     IEspContext *ctx = request->queryContext();
-    ctx->addTraceSummaryValue("wseclMode", "JSONPost");
+    ctx->addTraceSummaryValue(LogMin, "wseclMode", "JSONPost");
     IProperties *parms = request->queryParameters();
     StringBuffer jsonresp;
 
@@ -2710,7 +2710,7 @@ void CWsEclBinding::handleHttpPost(CHttpRequest *request, CHttpResponse *respons
 int CWsEclBinding::HandleSoapRequest(CHttpRequest* request, CHttpResponse* response)
 {
     IEspContext *ctx = request->queryContext();
-    ctx->addTraceSummaryValue("wseclMode", "SOAPPost");
+    ctx->addTraceSummaryValue(LogMin, "wseclMode", "SOAPPost");
     IProperties *parms = request->queryParameters();
 
     const char *thepath = request->queryPath();

+ 2 - 2
esp/services/ws_loggingservice/loggingservice.cpp

@@ -85,7 +85,7 @@ bool CWsLoggingServiceEx::onUpdateLog(IEspContext& context, IEspUpdateLogRequest
         if (!context.validateFeatureAccess(WSLOGGING_ACCESS, SecAccess_Write, false))
             throw MakeStringException(EspLoggingErrors::WSLoggingAccessDenied, "Failed to update log. Permission denied.");
 
-        context.addTraceSummaryTimeStamp("startQLog");
+        context.addTraceSummaryTimeStamp(LogMin, "startQLog");
         for (unsigned int x = 0; x < loggingAgentThreads.size(); x++)
         {
             IUpdateLogThread* loggingThread = loggingAgentThreads[x];
@@ -93,7 +93,7 @@ bool CWsLoggingServiceEx::onUpdateLog(IEspContext& context, IEspUpdateLogRequest
                 continue;
             loggingThread->queueLog(&req);
         }
-        context.addTraceSummaryTimeStamp("endQLog");
+        context.addTraceSummaryTimeStamp(LogMin, "endQLog");
         resp.setStatusCode(0);
         resp.setStatusMessage("Log will be updated.");
     }

+ 17 - 2
esp/src/eclwatch/ESPWorkunit.js

@@ -44,7 +44,9 @@ define([
         startProperty: "PageStartFrom",
         countProperty: "Count",
 
-        _watched: [],
+        constructor: function () {
+            this._watched = {};
+        },
         preRequest: function (request) {
             if (request.Sortby && request.Sortby === "TotalClusterTime") {
                 request.Sortby = "ClusterTime";
@@ -53,6 +55,7 @@ define([
         },
         preProcessFullResponse: function (response, request, query, options) {
             this.busy = false;
+            this._toUnwatch = lang.mixin({}, this._watched);
         },
         create: function (id) {
             return new Workunit({
@@ -69,7 +72,16 @@ define([
                         context.notify(storeItem, id);
                     }
                 });
+            } else {
+                delete this._toUnwatch[id];
             }
+        },
+        postProcessResults: function () {
+            for (var key in this._toUnwatch) {
+                this._toUnwatch[key].unwatch();
+                delete this._watched[key];
+            }
+            delete this._toUnwatch;
         }
     });
 
@@ -234,7 +246,10 @@ define([
             }
             if (!this.hasCompleted) {
                 var context = this;
-                this.watch("__hpcc_changedCount", function (name, oldValue, newValue) {
+                if (this._watchHandle) {
+                    this._watchHandle.unwatch();
+                }
+                this._watchHandle = this.watch("__hpcc_changedCount", function (name, oldValue, newValue) {
                     if (oldValue !== newValue && newValue) {
                         if (callback) {
                             callback(context);

+ 14 - 0
initfiles/componentfiles/configxml/esp.xsd.in

@@ -776,6 +776,20 @@
             </xs:attribute>
             <xs:attribute name="logRequests" type="xs:boolean" use="optional" default="true"/>
             <xs:attribute name="logResponses" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="txSummaryLevel" type="xs:nonNegativeInteger" use="optional" default="1">
+                <xs:annotation>
+                    <xs:appinfo>
+                        <tooltip>Sets the TxSummary level [0: none, 1: min, 5: noraml, 10: max]</tooltip>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:attribute>
+            <xs:attribute name="txSummaryResourceReq" type="xs:boolean" use="optional" default="false">
+                <xs:annotation>
+                    <xs:appinfo>
+                        <tooltip>Log TxSummary for Resource Requests</tooltip>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:attribute>
         </xs:complexType>
     </xs:element>
 </xs:schema>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
initfiles/componentfiles/configxml/master.xml


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
initfiles/componentfiles/configxml/slave.xml


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
initfiles/etc/DIR_NAME/configmgr/esp.xml.in


+ 2 - 0
initfiles/etc/DIR_NAME/environment.xml.in

@@ -255,6 +255,8 @@
               logLevel="1"
               logRequests="false"
               logResponses="false"
+              txSummaryLevel="1"
+              txSummaryResourceReq="false"
               maxBacklogQueueSize="200"
               maxConcurrentThreads="0"
               maxRequestEntityLength="8000000"

+ 1 - 0
plugins/cassandra/cassandrawu.cpp

@@ -3391,6 +3391,7 @@ public:
                 {
                 case WUSFappvalue:
                 {
+                    assertex(fv);
                     const char *name = fv;
                     fv = fv + strlen(fv)+1;
                     if (isWild)

+ 5 - 1
roxie/ccd/ccddali.cpp

@@ -851,7 +851,7 @@ public:
             {
                 try
                 {
-                    return createDllEntry(localName.str(), false, NULL);
+                    return createDllEntry(localName.str(), false, NULL, false);
                 }
                 catch (ICorruptDllException *E)
                 {
@@ -875,6 +875,10 @@ public:
         }
         return queryDllServer().loadDll(name, location);
     }
+    virtual ILoadedDllEntry * loadDllResources(const char * name, DllLocationType location) 
+    {
+        throwUnexpected();
+    }
 } roxieDllServer;
 
 bool CRoxieDaliHelper::isConnected = false;

+ 5 - 1
roxie/roxiemem/roxiemem.cpp

@@ -8077,6 +8077,10 @@ protected:
 
         delete [] slaveManagers;
 
+        for (unsigned i3 = 0; i3 < numSlaves; i3++)
+            delete allocators[i3];
+        delete [] allocators;
+
         unsigned elapsed = endTime - startTime;
         DBGLOG("Slave spill (%u,%u) = %ums", numSlaves, numIter, elapsed);
     }
@@ -8098,7 +8102,7 @@ protected:
         memsize_t maxMemory = heapTotalPages * HEAP_ALIGNMENT_SIZE;
         memsize_t wasted = 0;
 
-        void * * pages = new void * [heapTotalPages];
+        std::unique_ptr<void *[]> pages(new void * [heapTotalPages]);
         //Allocate a whole set of 1 page allocations
         unsigned scale = 1;
         memsize_t curSize =  HEAP_ALIGNMENT_SIZE * scale - HugeHeaplet::dataOffset();

+ 2 - 0
system/jlib/jtime.cpp

@@ -305,6 +305,8 @@ void CDateTime::set(unsigned year, unsigned month, unsigned day, unsigned hour,
         local.tm_min = minute;
         local.tm_sec = second;
         local.tm_isdst = -1;
+        local.tm_wday = 0;
+        local.tm_yday = 0;
         time_t simple = timelocal(&local);
         set(simple);
     }

+ 14 - 0
system/jlib/jutil.cpp

@@ -485,6 +485,20 @@ bool SharedObject::loadCurrentExecutable()
     return true;
 }
 
+bool SharedObject::loadResources(const char * dllName)
+{
+#ifdef _WIN32
+    UINT oldMode = SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
+    h = LoadLibraryEx(dllName, NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE);
+    if (!LoadSucceeded(h))
+        h = LoadLibraryEx(dllName, NULL, LOAD_LIBRARY_AS_DATAFILE); // the LOAD_LIBRARY_AS_IMAGE_RESOURCE flag is not supported on all versions of Windows
+    SetErrorMode(oldMode);
+    return LoadSucceeded(h);
+#else
+    UNIMPLEMENTED;
+#endif
+}
+
 void *SharedObject::getEntry(const char * name) const
 {
     return GetSharedProcedure(getInstanceHandle(), name);

+ 2 - 1
system/jlib/jutil.hpp

@@ -73,7 +73,8 @@ public:
     
     bool load(const char * dllName, bool isGlobal, bool raiseOnError=false);
     bool loadCurrentExecutable();
-    bool loaded()       { return h != 0; }
+    bool loadResources(const char * dllName);
+    bool loaded() const { return h != 0; }
     void unload();
     HINSTANCE getInstanceHandle() const { return h; }
     void *getEntry(const char * name) const;

+ 2 - 0
testing/regress/environment.xml.in

@@ -255,6 +255,8 @@
               logLevel="1"
               logRequests="false"
               logResponses="false"
+              txSummaryLevel="1"
+              txSummaryResourceReq="false"
               maxBacklogQueueSize="200"
               maxConcurrentThreads="0"
               maxRequestEntityLength="8000000"

+ 1 - 1
thorlcr/master/thgraphmanager.cpp

@@ -873,7 +873,7 @@ bool CJobManager::executeGraph(IConstWorkUnit &workunit, const char *graphName,
         sendSo = globals->getPropBool("Debug/@dllsToSlaves", true);
     }
 
-    Owned<ILoadedDllEntry> querySo = createDllEntry(compoundPath.str(), false, NULL);
+    Owned<ILoadedDllEntry> querySo = createDllEntry(compoundPath.str(), false, NULL, false);
 
     SCMStringBuffer eclstr;
     StringAttr user(workunit.queryUser());

+ 1 - 1
thorlcr/slave/slavmain.cpp

@@ -346,7 +346,7 @@ public:
                             soPath.clear().append(tempSo.str());
                         }
 #endif
-                        Owned<ILoadedDllEntry> querySo = createDllEntry(soPath.str(), false, NULL);
+                        Owned<ILoadedDllEntry> querySo = createDllEntry(soPath.str(), false, NULL, false);
 
                         Owned<IPropertyTree> workUnitInfo = createPTree(msg);
                         StringBuffer user;