Skip to content

Commit

Permalink
Changed regex string to have more strict matching criteria. Gets rid …
Browse files Browse the repository at this point in the history
…of the problem where queries are falsely labeled as being PUT/GET queries. Fixes #76
  • Loading branch information
sfc-gh-kwagner authored and smtakeda committed Aug 14, 2018
1 parent 0773c87 commit ed33b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ sf_bool STDCALL _is_put_get_command(char *sql_text) {
regex_t put_get_regex;
// On MacOS seems \s to match white space character did not work. Change to '[ ]' for now
//TODO maybe regex compilation should be moved to static variable so that no recompilation needed
regcomp(&put_get_regex, "^([ ]*\\/*.*\\/*[ ]*)*(put|get)[ ]+",
regcomp(&put_get_regex, "^([ ]*\\/\\*.*\\*\\/[ ]*)*([ ]*)*(put|get)[ ]+",
REG_ICASE | REG_EXTENDED);

int res;
Expand Down

0 comments on commit ed33b90

Please sign in to comment.