Browse Source

HPCC-9186 Roxie cores writing dataset to workunit

A regression introduced when json output support was added, by the looks of
it.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
8457648348
1 changed files with 6 additions and 4 deletions
  1. 6 4
      roxie/ccd/ccdserver.cpp

+ 6 - 4
roxie/ccd/ccdserver.cpp

@@ -19123,11 +19123,13 @@ public:
         {
             response = serverContext->queryResult(sequence);
             if (response)
-                response->startDataset("Dataset", helper.queryName(), sequence, (helper.getFlags() & POFextend) != 0);
-            if (response->mlFmt==MarkupFmt_XML || response->mlFmt==MarkupFmt_JSON)
             {
-                writer.setown(createIXmlWriter(serverContext->getXmlFlags(), 1, response, (response->mlFmt==MarkupFmt_JSON) ? WTJSON : WTStandard));
-                writer->outputBeginArray("Row");
+                response->startDataset("Dataset", helper.queryName(), sequence, (helper.getFlags() & POFextend) != 0);
+                if (response->mlFmt==MarkupFmt_XML || response->mlFmt==MarkupFmt_JSON)
+                {
+                    writer.setown(createIXmlWriter(serverContext->getXmlFlags(), 1, response, (response->mlFmt==MarkupFmt_JSON) ? WTJSON : WTStandard));
+                    writer->outputBeginArray("Row");
+                }
             }
 
         }