In cache testrules.c ensure there seems to be at least one thread

This commit is contained in:
Johan Wikman 2017-03-31 16:57:13 +03:00
parent 0f2f9d48b7
commit 815780aa4a
2 changed files with 4 additions and 0 deletions

View File

@ -537,6 +537,7 @@ static CACHE_RULE *cache_rule_create_regexp(cache_rule_attribute_t attribute,
pcre2_jit_compile(code, PCRE2_JIT_COMPLETE);
int n_threads = config_threadcount();
ss_dassert(n_threads > 0);
pcre2_match_data **datas = alloc_match_datas(n_threads, code);

View File

@ -236,6 +236,9 @@ int main()
if (mxs_log_init(NULL, ".", MXS_LOG_TARGET_DEFAULT))
{
MXS_CONFIG* pConfig = config_get_global_options();
pConfig->n_threads = 1;
set_libdir(MXS_STRDUP_A("../../../../../query_classifier/qc_sqlite/"));
if (qc_setup("qc_sqlite", "") && qc_process_init(QC_INIT_BOTH))
{