Skip to content

Commit

Permalink
Revert "Revert "Remove trailing spaces and semicolon from SET stateme…
Browse files Browse the repository at this point in the history
…nts #4341""

This reverts commit 707ec90.
  • Loading branch information
renecannao committed Sep 13, 2023
1 parent fc7cdfa commit 2ddc818
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/set_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ std::map<std::string,std::vector<std::string>> SetParser::parse1() {

re2::RE2 re0("^\\s*SET\\s+", *opt2);
re2::RE2::Replace(&query, re0, "");
re2::RE2 re1("(\\s|;)+$", *opt2); // remove trailing spaces and semicolon
re2::RE2::Replace(&query, re1, "");

std::map<std::string,std::vector<std::string>> result;

Expand Down Expand Up @@ -359,6 +361,9 @@ std::map<std::string,std::vector<std::string>> SetParser::parse1v2() {

re2::RE2 re0("^\\s*SET\\s+", *parse1v2_opt2);
re2::RE2::Replace(&query, re0, "");
re2::RE2 re1("(\\s|;)+$", *parse1v2_opt2); // remove trailing spaces and semicolon
re2::RE2::Replace(&query, re1, "");

VALGRIND_ENABLE_ERROR_REPORTING;
std::string var;
std::string value1, value2, value3, value4, value5;
Expand Down

0 comments on commit 2ddc818

Please sign in to comment.