Merge branch '2.1' into 2.2
This commit is contained in:
@ -183,6 +183,8 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (mxs_log_init(NULL, ".", MXS_LOG_TARGET_DEFAULT))
|
||||
{
|
||||
set_libdir(strdup("../../../query_classifier/qc_sqlite"));
|
||||
|
||||
// We have to setup something in order for the regexes to be compiled.
|
||||
if (qc_setup("qc_sqlite", QC_SQL_MODE_DEFAULT, NULL) &&
|
||||
qc_process_init(QC_INIT_BOTH) &&
|
||||
|
@ -420,6 +420,8 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (mxs_log_init(NULL, ".", MXS_LOG_TARGET_DEFAULT))
|
||||
{
|
||||
set_libdir(strdup("../../../query_classifier/qc_sqlite"));
|
||||
|
||||
// We have to setup something in order for the regexes to be compiled.
|
||||
if (qc_setup("qc_sqlite", QC_SQL_MODE_DEFAULT, NULL) &&
|
||||
qc_process_init(QC_INIT_BOTH) &&
|
||||
|
@ -590,7 +590,7 @@ static pcre2_code* remove_comments_re = NULL;
|
||||
static const PCRE2_SPTR remove_comments_pattern = (PCRE2_SPTR)
|
||||
"(?:`[^`]*`\\K)|"
|
||||
"(\\/[*](?!(M?!)).*?[*]\\/)|"
|
||||
"([[:space:]](?:#.*|--[[:space:]].*(\\n|\\r\\n)))";
|
||||
"((?:#.*|--[[:space:]].*)(\\n|\\r\\n|$))";
|
||||
|
||||
/**
|
||||
* Remove SQL comments from the end of a string
|
||||
|
Reference in New Issue
Block a user