From ed33b909adb1fbe884c78db7d9c14675b18f45f2 Mon Sep 17 00:00:00 2001 From: notkriswagner Date: Mon, 13 Aug 2018 17:44:01 -0400 Subject: [PATCH] Changed regex string to have more strict matching criteria. Gets rid of the problem where queries are falsely labeled as being PUT/GET queries. Fixes #76 --- lib/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/platform.c b/lib/platform.c index 855bf161bd..a37541f2e9 100755 --- a/lib/platform.c +++ b/lib/platform.c @@ -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;