query_classifier.cc: query_is_parsed is now global function and can be used to check whether parsing information already exists in the buffer.

skygw_utils.cc: removed replace_str and implemented replace_literal which replaces user-provided literals in query with predefined string "?". Replacing is done one by one, so it is suboptimal ipmlementation since all literals could be passed to replacement function in one call and processed all before returning.
This commit is contained in:
VilhoRaatikka
2014-08-21 22:28:23 +03:00
parent 4a2d81e066
commit fa2189373d
6 changed files with 94 additions and 64 deletions

View File

@ -61,6 +61,8 @@ char* skygw_get_canonical(GWBUF* querybuf);
bool parse_query (GWBUF* querybuf);
parsing_info_t* parsing_info_init(void (*donefun)(void *));
void parsing_info_done(void* ptr);
bool query_is_parsed(GWBUF* buf);