浏览代码

Merge pull request #9493 from afishbeck/eclccserverPreserveIfArchive

HPCC-16866 New flag hasArchive set even when archive xml is removed query text

Reviewed-By: Xiaoming Wang <xiaoming.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 年之前
父节点
当前提交
9b62110a23
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 6 0
      common/workunit/workunit.cpp
  2. 1 0
      common/workunit/workunit.hpp

+ 6 - 0
common/workunit/workunit.cpp

@@ -1668,6 +1668,10 @@ public:
     virtual IConstWUAssociatedFile * getAssociatedFile(WUFileType type, unsigned index) const;
     virtual IConstWUAssociatedFileIterator& getAssociatedFiles() const;
     virtual bool isArchive() const;
+    virtual bool hasArchive() const
+    {
+        return p->getPropBool("@hasArchive");
+    }
 
     virtual void        setQueryType(WUQueryType qt);
     virtual void        setQueryText(const char *pstr);
@@ -7325,6 +7329,8 @@ void CLocalWUQuery::setQueryText(const char *text)
             p->setProp("ShortText", xml->queryProp("Query"));
     }
     p->setPropBool("@isArchive", isArchive);
+    if (isArchive)
+        p->setPropBool("@hasArchive", true); //preserved if setQueryText is called multiple times.  Should setting this be more explicit?
 }
 
 void CLocalWUQuery::setQueryName(const char *qname)

+ 1 - 0
common/workunit/workunit.hpp

@@ -419,6 +419,7 @@ interface IConstWUQuery : extends IInterface
     virtual IStringVal & getQueryShortText(IStringVal & str) const = 0;
     virtual IStringVal & getQueryMainDefinition(IStringVal & str) const = 0;
     virtual bool isArchive() const = 0;
+    virtual bool hasArchive() const = 0;
 };