Merge branch '2.1' into develop

This commit is contained in:
Markus Mäkelä
2017-07-24 12:37:25 +03:00
21 changed files with 111 additions and 42 deletions

View File

@ -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)

View File

@ -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;

View File

@ -0,0 +1 @@
select 1;

View File

@ -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);

View File

@ -0,0 +1 @@
create or replace table t1 (id int);

View File

@ -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

View File

@ -0,0 +1,2 @@
rule no_selects deny on_queries select
users %@% match any rules no_selects

View File

@ -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++)

View 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;
}