MXS-1389: Fix rule reloading and query parsing requirements

Reloading of rules now properly uses the current rule file if no argument
was provided. The rule version counter also used atomic operations for the
sake of correctness.

The rule parsing is now only required for DML type statements that should
be fully parsed.
This commit is contained in:
Markus Mäkelä
2017-09-07 15:17:18 +03:00
parent 26f0c08522
commit a4975edbba
6 changed files with 35 additions and 18 deletions

View File

@ -1,4 +1,6 @@
create or replace table test.t1(id int);
drop table if exists test.t1;
create table test.t1(id int);
drop function if exists my_function;
create function my_function (arg int) returns int deterministic return arg * arg;
select "sum(1)";
select (1);

View File

@ -1 +1,2 @@
create or replace table t1 (id int);
drop table if exists t1;
create table t1 (id int);

View File

@ -20,7 +20,7 @@ int main(int argc, char *argv[])
char rules_dir[4096];
sprintf(rules_dir, "%s/fw/", test_dir);
int N = 10;
int N = 12;
int i;
Test->stop_maxscale();