From 7500944b2df8d78603bd9b57bdc8ca8be835347d Mon Sep 17 00:00:00 2001 From: vlastahajek Date: Mon, 8 Feb 2021 12:18:06 +0100 Subject: [PATCH] fix: Skipping unexpected annonations (#136) --- CHANGELOG.md | 5 ++++- src/query/FluxParser.cpp | 4 +++- test/server/server.js | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2446532..a6cb6ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ # Changelog -## 3.x.x [in progress] +## 3.7.1 [in progress] ### Documentation - [#134](https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/pull/134): - Added untrusted connection (skipping certificate validation) info to Readme - `SecureWrite` and `SecureBatchWrite` demos enhanced with example about using untrusted connection - Various fixes of typos +### Fixes + - [#137](https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/pull/137) - Fixed parsing Flux response with unexpected annotations + ## 3.7.0 [2020-12-24] ### Features - [#125](https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino/pull/124) - Added credentials to the InfluxDB 1.x validation endpoint (/ping). To leverage this, [enable ping authentication](https://docs.influxdata.com/influxdb/v1.8/administration/config/#ping-auth-enabled-false) diff --git a/src/query/FluxParser.cpp b/src/query/FluxParser.cpp index a47fa6d..fe1737d 100644 --- a/src/query/FluxParser.cpp +++ b/src/query/FluxParser.cpp @@ -196,7 +196,9 @@ bool FluxQueryResult::next() { } parsingState = ParsingStateNameRow; goto readRow; - } + } else { + goto readRow; + } return true; } diff --git a/test/server/server.js b/test/server/server.js index b3f6509..56bc1df 100644 --- a/test/server/server.js +++ b/test/server/server.js @@ -230,6 +230,8 @@ app.post(prefix + '/api/v2/delete', (req,res) => { var queryRes = { "singleTable":`#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double,string,string,string,string +#group,false,false,true,true,false,false,true,true,true,true +#default,_result,,,,,,,,, ,result,table,_start,_stop,_time,_value,_field,_measurement,a,b ,,0,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T10:34:08.135814545Z,1.4,f,test,1,adsfasdf ,,1,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.850214724Z,6.6,f,test,3,adsfasdf