Add tests from develop
Added tests from develop. The test results need to be modified for 2.0.
This commit is contained in:
3
maxscale-system-test/fw2/deny1
Normal file
3
maxscale-system-test/fw2/deny1
Normal file
@ -0,0 +1,3 @@
|
||||
drop table if exists t1;
|
||||
create table t1(id int);
|
||||
alter table t1 add column b int;
|
2
maxscale-system-test/fw2/deny2
Normal file
2
maxscale-system-test/fw2/deny2
Normal file
@ -0,0 +1,2 @@
|
||||
grant select on *.* to 'skysql'@'localhost';
|
||||
revoke select on *.* from 'skysql'@'localhost';
|
2
maxscale-system-test/fw2/deny3
Normal file
2
maxscale-system-test/fw2/deny3
Normal file
@ -0,0 +1,2 @@
|
||||
use test;
|
||||
load data local infile 'test.csv' into table test.t1;
|
10
maxscale-system-test/fw2/deny4
Normal file
10
maxscale-system-test/fw2/deny4
Normal file
@ -0,0 +1,10 @@
|
||||
select sum(1) from test.t1;
|
||||
select avg(1) from test.t1;
|
||||
select sum(avg(1)) from test.t1;
|
||||
select my_function(1) from test.t1;
|
||||
select my_function("1") from test.t1;
|
||||
select * from test.t1 where 1 = 1;
|
||||
select * from test.t1 where 1 >= 1;
|
||||
select * from test.t1 where 1 <= 1;
|
||||
select * from test.t1 where 1 != 1;
|
||||
select * from test.t1 where 1 <> 1;
|
3
maxscale-system-test/fw2/pass1
Normal file
3
maxscale-system-test/fw2/pass1
Normal file
@ -0,0 +1,3 @@
|
||||
select * from mysql.user;
|
||||
use mysql;
|
||||
set @var = 1;
|
3
maxscale-system-test/fw2/pass2
Normal file
3
maxscale-system-test/fw2/pass2
Normal file
@ -0,0 +1,3 @@
|
||||
select * from mysql.user;
|
||||
use mysql;
|
||||
set @var = 1;
|
2
maxscale-system-test/fw2/pass3
Normal file
2
maxscale-system-test/fw2/pass3
Normal file
@ -0,0 +1,2 @@
|
||||
select * from mysql.user;
|
||||
set @var = 1;
|
5
maxscale-system-test/fw2/pass4
Normal file
5
maxscale-system-test/fw2/pass4
Normal file
@ -0,0 +1,5 @@
|
||||
create or replace table test.t1(id int);
|
||||
create function my_function (arg int) returns int deterministic return arg * arg;
|
||||
select "sum(1)";
|
||||
select (1);
|
||||
select * from(select 1) as a;
|
4
maxscale-system-test/fw2/rules1
Normal file
4
maxscale-system-test/fw2/rules1
Normal file
@ -0,0 +1,4 @@
|
||||
rule test1 deny regex '.*' on_queries drop
|
||||
rule test2 deny regex '.*' on_queries create
|
||||
rule test3 deny regex '.*' on_queries alter
|
||||
users %@% match any rules test1 test2 test3
|
3
maxscale-system-test/fw2/rules2
Normal file
3
maxscale-system-test/fw2/rules2
Normal file
@ -0,0 +1,3 @@
|
||||
rule test1 deny regex '.*' on_queries grant
|
||||
rule test2 deny regex '.*' on_queries revoke
|
||||
users %@% match any rules test1 test2
|
3
maxscale-system-test/fw2/rules3
Normal file
3
maxscale-system-test/fw2/rules3
Normal file
@ -0,0 +1,3 @@
|
||||
rule test1 deny regex '.*' on_queries use
|
||||
rule test2 deny regex '.*' on_queries load
|
||||
users %@% match any rules test1 test2
|
4
maxscale-system-test/fw2/rules4
Normal file
4
maxscale-system-test/fw2/rules4
Normal file
@ -0,0 +1,4 @@
|
||||
rule test1 deny function sum avg on_queries select
|
||||
rule test2 deny function my_function on_queries select
|
||||
rule test3 deny function = >= <= != <> on_queries select
|
||||
users %@% match any rules test1 test2 test3
|
Reference in New Issue
Block a user