Merge branch '2.2' into develop
This commit is contained in:
@ -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
|
caused by the fact that readwritesplit executes the statements one at a time to
|
||||||
track the state of the response.
|
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
|
#### Limitations in multi-statement handling
|
||||||
|
|
||||||
When a multi-statement query is executed through the readwritesplit router, it
|
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
|
[`strict_multi_stmt`](../Routers/ReadWriteSplit.md#strict_multi_stmt) for more
|
||||||
details.
|
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
|
#### Limitations in client session handling
|
||||||
|
|
||||||
Some of the queries that a client sends are routed to all backends instead of
|
Some of the queries that a client sends are routed to all backends instead of
|
||||||
|
@ -185,9 +185,8 @@ int main(int argc, char *argv[])
|
|||||||
Test->set_timeout(600);
|
Test->set_timeout(600);
|
||||||
Test->maxscales->stop_maxscale(0);
|
Test->maxscales->stop_maxscale(0);
|
||||||
|
|
||||||
// Remove old data files and make sure that port 4001 is open
|
// Remove old data files
|
||||||
Test->maxscales->ssh_node_f(0, true, "rm -rf /var/lib/maxscale/avro;"
|
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;");
|
|
||||||
|
|
||||||
Test->repl->connect();
|
Test->repl->connect();
|
||||||
execute_query(Test->repl->nodes[0], "DROP TABLE IF EXISTS t1;");
|
execute_query(Test->repl->nodes[0], "DROP TABLE IF EXISTS t1;");
|
||||||
|
@ -21,4 +21,4 @@ passwd=maxinfo_passwd
|
|||||||
type=listener
|
type=listener
|
||||||
service=MaxInfo
|
service=MaxInfo
|
||||||
protocol=MySQLClient
|
protocol=MySQLClient
|
||||||
port=9003
|
port=4006
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
# Masking User
|
# Masking User
|
||||||
#
|
#
|
||||||
# See ../masking_rules.json
|
# See ../masking_rules.json
|
||||||
|
--disable_warnings
|
||||||
drop database if exists maskingdb;
|
drop database if exists maskingdb;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
create database maskingdb;
|
create database maskingdb;
|
||||||
use maskingdb;
|
use maskingdb;
|
||||||
|
@ -17,17 +17,21 @@ int main(int argc, char *argv[])
|
|||||||
Test->set_timeout(60);
|
Test->set_timeout(60);
|
||||||
int chunk_size = 2500000;
|
int chunk_size = 2500000;
|
||||||
int chunk_num = 5;
|
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;"
|
Test->maxscales->ssh_node_f(0, true, "cd %s;"
|
||||||
"rm -rf rules;"
|
"rm -rf rules;"
|
||||||
"mkdir rules;"
|
"mkdir rules;"
|
||||||
"chown vagrant:vagrant rules",
|
"chown vagrant:vagrant rules",
|
||||||
Test->maxscales->access_homedir[0]);
|
Test->maxscales->access_homedir[0]);
|
||||||
copy_rules(Test, (char *) "rules2", "./fw/");
|
copy_rules(Test, "rules2", fw_rules.c_str());
|
||||||
|
|
||||||
Test->maxscales->start_maxscale(0);
|
Test->maxscales->start_maxscale(0);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ void double_cursor(TestConnections& test, MYSQL* conn)
|
|||||||
MYSQL_STMT* stmt1 = mysql_stmt_init(conn);
|
MYSQL_STMT* stmt1 = mysql_stmt_init(conn);
|
||||||
const char* query = "SELECT id FROM test.t1";
|
const char* query = "SELECT id FROM test.t1";
|
||||||
int rc = mysql_stmt_prepare(stmt1, query, strlen(query));
|
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;
|
int type = CURSOR_TYPE_READ_ONLY;
|
||||||
mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, &type);
|
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);
|
MYSQL_STMT* stmt2 = mysql_stmt_init(conn);
|
||||||
rc = mysql_stmt_prepare(stmt2, query, strlen(query));
|
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_attr_set(stmt2, STMT_ATTR_CURSOR_TYPE, &type);
|
||||||
mysql_stmt_bind_result(stmt2, bind);
|
mysql_stmt_bind_result(stmt2, bind);
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ namespace
|
|||||||
// Specified in the configuration file.
|
// Specified in the configuration file.
|
||||||
char USER[] = "maxinfo_user";
|
char USER[] = "maxinfo_user";
|
||||||
char PASSWD[] = "maxinfo_passwd";
|
char PASSWD[] = "maxinfo_passwd";
|
||||||
int PORT = 9003;
|
int PORT = 4006;
|
||||||
|
|
||||||
void run(TestConnections& test, MYSQL* pMysql)
|
void run(TestConnections& test, MYSQL* pMysql)
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@ void run(TestConnections& test, MYSQL* pMysql)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
test.assert(false, "Executing 'show eventTimes' failed.");
|
test.assert(false, "Executing 'show eventTimes' failed: %s", mysql_error(pMysql));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ void TestConnections::init_maxscale(int m)
|
|||||||
"chmod 664 %s/certs/*.pem;"
|
"chmod 664 %s/certs/*.pem;"
|
||||||
"chmod a+x %s;"
|
"chmod a+x %s;"
|
||||||
"%s"
|
"%s"
|
||||||
"iptables -I INPUT -p tcp --dport 4001 -j ACCEPT;"
|
"iptables -F INPUT;"
|
||||||
"rm -f %s/maxscale.log;"
|
"rm -f %s/maxscale.log;"
|
||||||
"rm -f %s/maxscale1.log;"
|
"rm -f %s/maxscale1.log;"
|
||||||
"rm -rf /tmp/core* /dev/shm/* /var/lib/maxscale/maxscale.cnf.d/ /var/lib/maxscale/*;"
|
"rm -rf /tmp/core* /dev/shm/* /var/lib/maxscale/maxscale.cnf.d/ /var/lib/maxscale/*;"
|
||||||
|
Reference in New Issue
Block a user