Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä 2018-05-17 11:23:03 +03:00
commit 051ed76d73
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
8 changed files with 21 additions and 22 deletions

View File

@ -179,15 +179,6 @@ Readwritesplit does not support pipelining of JDBC batched statements. This is
caused by the fact that readwritesplit executes the statements one at a time to
track the state of the response.
#### Prepared Statement Limitations
Readwritesplit does not support the parallel execution of binary protocol
prepared statements that use cursors. In practice this means that only one
open cursor is allowed when readwritesplit is used.
Opening more than one cursor will cause the execution of the prepared
statements to stall.
#### Limitations in multi-statement handling
When a multi-statement query is executed through the readwritesplit router, it
@ -195,6 +186,10 @@ will always be routed to the master. See
[`strict_multi_stmt`](../Routers/ReadWriteSplit.md#strict_multi_stmt) for more
details.
Execution of LOAD DATA LOCAL INFILE statements inside a multi-statement query is
not supported. If one is executed MaxScale will most likely hang (see
[MXS-1828](https://jira.mariadb.org/browse/MXS-1828)).
#### Limitations in client session handling
Some of the queries that a client sends are routed to all backends instead of

View File

@ -185,9 +185,8 @@ int main(int argc, char *argv[])
Test->set_timeout(600);
Test->maxscales->stop_maxscale(0);
// Remove old data files and make sure that port 4001 is open
Test->maxscales->ssh_node_f(0, true, "rm -rf /var/lib/maxscale/avro;"
"iptables -n -L INPUT|grep 4001 || iptables -I INPUT -p tcp --dport 4001 -j ACCEPT;");
// Remove old data files
Test->maxscales->ssh_node_f(0, true, "rm -rf /var/lib/maxscale/avro;");
Test->repl->connect();
execute_query(Test->repl->nodes[0], "DROP TABLE IF EXISTS t1;");

View File

@ -21,4 +21,4 @@ passwd=maxinfo_passwd
type=listener
service=MaxInfo
protocol=MySQLClient
port=9003
port=4006

View File

@ -2,8 +2,9 @@
# Masking User
#
# See ../masking_rules.json
--disable_warnings
drop database if exists maskingdb;
--enable_warnings
create database maskingdb;
use maskingdb;

View File

@ -17,17 +17,21 @@ int main(int argc, char *argv[])
Test->set_timeout(60);
int chunk_size = 2500000;
int chunk_num = 5;
std::string src_dir = test_dir;
std::string masking_rules = src_dir + "/masking/masking_user/masking_rules.json";
std::string cache_rules = src_dir + "/cache/cache_basic/cache_rules.json";
std::string fw_rules = src_dir + "/fw";
Test->maxscales->copy_to_node_legacy("./masking/masking_user/masking_rules.json", "~/", 0);
Test->maxscales->copy_to_node_legacy(masking_rules.c_str(), "~/", 0);
Test->maxscales->copy_to_node_legacy("./cache/cache_basic/cache_rules.json", "~/", 0);
Test->maxscales->copy_to_node_legacy(cache_rules.c_str(), "~/", 0);
Test->maxscales->ssh_node_f(0, true, "cd %s;"
"rm -rf rules;"
"mkdir rules;"
"chown vagrant:vagrant rules",
Test->maxscales->access_homedir[0]);
copy_rules(Test, (char *) "rules2", "./fw/");
copy_rules(Test, "rules2", fw_rules.c_str());
Test->maxscales->start_maxscale(0);

View File

@ -18,7 +18,7 @@ void double_cursor(TestConnections& test, MYSQL* conn)
MYSQL_STMT* stmt1 = mysql_stmt_init(conn);
const char* query = "SELECT id FROM test.t1";
int rc = mysql_stmt_prepare(stmt1, query, strlen(query));
test.assert(rc == 0, "Prepare should work: %s %s", mysql_stmt_error(stmt1), mysql_error(conn));
test.assert(rc == 0, "First prepare should work: %s %s", mysql_stmt_error(stmt1), mysql_error(conn));
int type = CURSOR_TYPE_READ_ONLY;
mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, &type);
@ -35,7 +35,7 @@ void double_cursor(TestConnections& test, MYSQL* conn)
MYSQL_STMT* stmt2 = mysql_stmt_init(conn);
rc = mysql_stmt_prepare(stmt2, query, strlen(query));
test.assert(rc == 0, "Prepare should work: %s %s", mysql_stmt_error(stmt2), mysql_error(conn));
test.assert(rc == 0, "Second prepare should work: %s %s", mysql_stmt_error(stmt2), mysql_error(conn));
mysql_stmt_attr_set(stmt2, STMT_ATTR_CURSOR_TYPE, &type);
mysql_stmt_bind_result(stmt2, bind);

View File

@ -22,7 +22,7 @@ namespace
// Specified in the configuration file.
char USER[] = "maxinfo_user";
char PASSWD[] = "maxinfo_passwd";
int PORT = 9003;
int PORT = 4006;
void run(TestConnections& test, MYSQL* pMysql)
{
@ -58,7 +58,7 @@ void run(TestConnections& test, MYSQL* pMysql)
}
else
{
test.assert(false, "Executing 'show eventTimes' failed.");
test.assert(false, "Executing 'show eventTimes' failed: %s", mysql_error(pMysql));
}
}

View File

@ -641,7 +641,7 @@ void TestConnections::init_maxscale(int m)
"chmod 664 %s/certs/*.pem;"
"chmod a+x %s;"
"%s"
"iptables -I INPUT -p tcp --dport 4001 -j ACCEPT;"
"iptables -F INPUT;"
"rm -f %s/maxscale.log;"
"rm -f %s/maxscale1.log;"
"rm -rf /tmp/core* /dev/shm/* /var/lib/maxscale/maxscale.cnf.d/ /var/lib/maxscale/*;"