Merge branch '2.1' into develop
This commit is contained in:
@ -479,6 +479,10 @@ add_test_executable(mxs1045.cpp mxs1045 mxs1045 LABELS maxscale REPL_BACKEND)
|
||||
# https://jira.mariadb.org/browse/MXS-1123
|
||||
add_test_executable(mxs1123.cpp mxs1123 mxs1123 LABELS maxscale REPL_BACKEND)
|
||||
|
||||
# MXS-1319: Maxscale selecting extra whitespace while loading users
|
||||
# https://jira.mariadb.org/browse/MXS-1319
|
||||
add_test_executable(mxs1319.cpp mxs1319 replication LABELS MySQLAuth REPL_BACKEND)
|
||||
|
||||
# 'namedserverfilter' test
|
||||
add_test_executable(namedserverfilter.cpp namedserverfilter namedserverfilter LABELS namedserverfilter LIGHT REPL_BACKEND)
|
||||
|
||||
|
@ -8,3 +8,5 @@ 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 function(*) from test.t1;
|
||||
select insert(*) from test.t1;
|
||||
|
1
maxscale-system-test/fw2/deny5
Normal file
1
maxscale-system-test/fw2/deny5
Normal file
@ -0,0 +1 @@
|
||||
select 1;
|
@ -3,3 +3,4 @@ create function my_function (arg int) returns int deterministic return arg * arg
|
||||
select "sum(1)";
|
||||
select (1);
|
||||
select * from(select 1) as a;
|
||||
insert into test.t1 values (1);
|
||||
|
1
maxscale-system-test/fw2/pass5
Normal file
1
maxscale-system-test/fw2/pass5
Normal file
@ -0,0 +1 @@
|
||||
create or replace table t1 (id int);
|
@ -1,4 +1,5 @@
|
||||
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
|
||||
rule test4 deny function `function` `insert`
|
||||
users %@% match any rules test1 test2 test3 test4
|
||||
|
2
maxscale-system-test/fw2/rules5
Normal file
2
maxscale-system-test/fw2/rules5
Normal file
@ -0,0 +1,2 @@
|
||||
rule no_selects deny on_queries select
|
||||
users %@% match any rules no_selects
|
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
||||
FILE* file;
|
||||
|
||||
sprintf(rules_dir, "%s/fw2/", test_dir);
|
||||
int N = 4;
|
||||
int N = 5;
|
||||
int i;
|
||||
|
||||
for (i = 1; i < N + 1; i++)
|
||||
|
23
maxscale-system-test/mxs1319.cpp
Normal file
23
maxscale-system-test/mxs1319.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Check that SQL_MODE='PAD_CHAR_TO_FULL_LENGTH' doesn't break authentication
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
|
||||
test.tprintf("Changing SQL_MODE to PAD_CHAR_TO_FULL_LENGTH and restarting MaxScale");
|
||||
test.repl->connect();
|
||||
test.repl->execute_query_all_nodes("SET GLOBAL SQL_MODE='PAD_CHAR_TO_FULL_LENGTH'");
|
||||
test.restart_maxscale();
|
||||
|
||||
test.tprintf("Connecting to MaxScale and executing a query");
|
||||
test.connect_maxscale();
|
||||
test.try_query(test.conn_rwsplit, "SELECT 1");
|
||||
test.close_maxscale_connections();
|
||||
|
||||
test.repl->execute_query_all_nodes("SET GLOBAL SQL_MODE=DEFAULT");
|
||||
return test.global_result;
|
||||
}
|
Reference in New Issue
Block a user