From 9046db06c52b9a4413862af6954f951cc362b76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 19 Sep 2017 16:13:52 +0300 Subject: [PATCH 01/10] MXS-1295: Add `strict_sp_calls` parameter The new parameter allows the session to be "locked" to the master server after a stored procedure is called. This will keep the session state consistent if the stored procedure call modifies the state of the session. --- Documentation/Routers/ReadWriteSplit.md | 9 +++++++++ server/modules/routing/readwritesplit/readwritesplit.c | 8 ++++++++ server/modules/routing/readwritesplit/readwritesplit.h | 1 + .../modules/routing/readwritesplit/rwsplit_internal.h | 1 + .../routing/readwritesplit/rwsplit_route_stmt.c | 10 +++++++--- .../routing/readwritesplit/rwsplit_tmp_table_multi.c | 5 +++++ 6 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Documentation/Routers/ReadWriteSplit.md b/Documentation/Routers/ReadWriteSplit.md index c4cd6ac2c..90f756e4d 100644 --- a/Documentation/Routers/ReadWriteSplit.md +++ b/Documentation/Routers/ReadWriteSplit.md @@ -221,6 +221,15 @@ multi-statement queries. router_options=strict_multi_stmt=false ``` +### `strict_sp_calls` + +Similar to `strict_multi_stmt`, this option allows all queries after a CALL +operation on a stored procedure to be routed to the master. This option is +disabled by default and was added in MaxScale 2.1.9. + +All warnings and restrictions that apply to `strict_multi_stmt` also apply to +`strict_sp_calls`. + ### `master_failure_mode` This option controls how the failure of a master server is handled. By default, diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index ce15f6cad..e2c76158f 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -195,6 +195,7 @@ MXS_MODULE *MXS_CREATE_MODULE() {"disable_sescmd_history", MXS_MODULE_PARAM_BOOL, "true"}, {"max_sescmd_history", MXS_MODULE_PARAM_COUNT, "0"}, {"strict_multi_stmt", MXS_MODULE_PARAM_BOOL, "true"}, + {"strict_sp_calls", MXS_MODULE_PARAM_BOOL, "false"}, {"master_accept_reads", MXS_MODULE_PARAM_BOOL, "false"}, {MXS_END_MODULE_PARAMS} } @@ -275,6 +276,7 @@ static MXS_ROUTER *createInstance(SERVICE *service, char **options) router->rwsplit_config.max_slave_replication_lag = config_get_integer(params, "max_slave_replication_lag"); router->rwsplit_config.retry_failed_reads = config_get_bool(params, "retry_failed_reads"); router->rwsplit_config.strict_multi_stmt = config_get_bool(params, "strict_multi_stmt"); + router->rwsplit_config.strict_sp_calls = config_get_bool(params, "strict_sp_calls"); router->rwsplit_config.disable_sescmd_history = config_get_bool(params, "disable_sescmd_history"); router->rwsplit_config.max_sescmd_history = config_get_integer(params, "max_sescmd_history"); router->rwsplit_config.master_accept_reads = config_get_bool(params, "master_accept_reads"); @@ -606,6 +608,8 @@ static void diagnostics(MXS_ROUTER *instance, DCB *dcb) router->rwsplit_config.retry_failed_reads ? "true" : "false"); dcb_printf(dcb, "\tstrict_multi_stmt: %s\n", router->rwsplit_config.strict_multi_stmt ? "true" : "false"); + dcb_printf(dcb, "\tstrict_sp_calls: %s\n", + router->rwsplit_config.strict_sp_calls ? "true" : "false"); dcb_printf(dcb, "\tdisable_sescmd_history: %s\n", router->rwsplit_config.disable_sescmd_history ? "true" : "false"); dcb_printf(dcb, "\tmax_sescmd_history: %d\n", @@ -1187,6 +1191,10 @@ static bool rwsplit_process_router_options(ROUTER_INSTANCE *router, { router->rwsplit_config.strict_multi_stmt = config_truth_value(value); } + else if (strcmp(options[i], "strict_sp_calls") == 0) + { + router->rwsplit_config.strict_sp_calls = config_truth_value(value); + } else if (strcmp(options[i], "retry_failed_reads") == 0) { router->rwsplit_config.retry_failed_reads = config_truth_value(value); diff --git a/server/modules/routing/readwritesplit/readwritesplit.h b/server/modules/routing/readwritesplit/readwritesplit.h index 671bd9f9c..d93cb5ed7 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.h +++ b/server/modules/routing/readwritesplit/readwritesplit.h @@ -272,6 +272,7 @@ typedef struct rwsplit_config_st bool master_accept_reads; /**< Use master for reads */ bool strict_multi_stmt; /**< Force non-multistatement queries to be routed * to the master after a multistatement query. */ + bool strict_sp_calls; /**< Lock session to master after an SP call */ enum failure_mode master_failure_mode; /**< Master server failure handling mode. * @see enum failure_mode */ bool retry_failed_reads; /**< Retry failed reads on other servers */ diff --git a/server/modules/routing/readwritesplit/rwsplit_internal.h b/server/modules/routing/readwritesplit/rwsplit_internal.h index 78f415218..ce11fefef 100644 --- a/server/modules/routing/readwritesplit/rwsplit_internal.h +++ b/server/modules/routing/readwritesplit/rwsplit_internal.h @@ -146,6 +146,7 @@ bool is_read_tmp_table(ROUTER_CLIENT_SES *router_cli_ses, void check_create_tmp_table(ROUTER_CLIENT_SES *router_cli_ses, GWBUF *querybuf, qc_query_type_t type); bool check_for_multi_stmt(GWBUF *buf, void *protocol, mysql_server_cmd_t packet_type); +bool check_for_sp_call(GWBUF *buf, mysql_server_cmd_t packet_type); qc_query_type_t determine_query_type(GWBUF *querybuf, int packet_type, bool non_empty_packet); void close_failed_bref(backend_ref_t *bref, bool fatal); diff --git a/server/modules/routing/readwritesplit/rwsplit_route_stmt.c b/server/modules/routing/readwritesplit/rwsplit_route_stmt.c index b8352215e..9bb12a7ba 100644 --- a/server/modules/routing/readwritesplit/rwsplit_route_stmt.c +++ b/server/modules/routing/readwritesplit/rwsplit_route_stmt.c @@ -134,9 +134,11 @@ bool route_single_stmt(ROUTER_INSTANCE *inst, ROUTER_CLIENT_SES *rses, succp = handle_master_is_target(inst, rses, &target_dcb); if (!rses->rses_config.strict_multi_stmt && + !rses->rses_config.strict_sp_calls && rses->forced_node == rses->rses_master_ref) { - /** Reset the forced node as we're in relaxed multi-statement mode */ + /** Reset the forced node as we're in relaxed multi-statement + * and SP call mode */ rses->forced_node = NULL; } } @@ -892,12 +894,14 @@ handle_multi_temp_and_load(ROUTER_CLIENT_SES *rses, GWBUF *querybuf, * situation, assigning QUERY_TYPE_WRITE for the query will trigger * the error processing. */ if ((rses->forced_node == NULL || rses->forced_node != rses->rses_master_ref) && - check_for_multi_stmt(querybuf, rses->client_dcb->protocol, packet_type)) + (check_for_multi_stmt(querybuf, rses->client_dcb->protocol, packet_type) || + check_for_sp_call(querybuf, packet_type))) { if (rses->rses_master_ref) { rses->forced_node = rses->rses_master_ref; - MXS_INFO("Multi-statement query, routing all future queries to master."); + MXS_INFO("Multi-statement query or stored procedure call, routing " + "all future queries to master."); } else { diff --git a/server/modules/routing/readwritesplit/rwsplit_tmp_table_multi.c b/server/modules/routing/readwritesplit/rwsplit_tmp_table_multi.c index ecdd0e2a4..d9e52f50c 100644 --- a/server/modules/routing/readwritesplit/rwsplit_tmp_table_multi.c +++ b/server/modules/routing/readwritesplit/rwsplit_tmp_table_multi.c @@ -355,6 +355,11 @@ bool check_for_multi_stmt(GWBUF *buf, void *protocol, mysql_server_cmd_t packet_ return rval; } +bool check_for_sp_call(GWBUF *buf, mysql_server_cmd_t packet_type) +{ + return packet_type == MYSQL_COM_QUERY && qc_get_operation(buf) == QUERY_OP_CALL; +} + /** * @brief Determine the type of a query * From 481ad080ef543acca858945d3e3f063f741987cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Sep 2017 10:36:27 +0300 Subject: [PATCH 02/10] MXS-1295: Add test case The test case checks that the strict_sp_calls parameter works as expected. --- maxscale-system-test/CMakeLists.txt | 6 +++ .../cnf/maxscale.cnf.template.mxs1295 | 48 +++++++++++++++++++ maxscale-system-test/mxs1295_sp_call.cpp | 44 +++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 maxscale-system-test/cnf/maxscale.cnf.template.mxs1295 create mode 100644 maxscale-system-test/mxs1295_sp_call.cpp diff --git a/maxscale-system-test/CMakeLists.txt b/maxscale-system-test/CMakeLists.txt index 6ff24e028..1011f301e 100644 --- a/maxscale-system-test/CMakeLists.txt +++ b/maxscale-system-test/CMakeLists.txt @@ -488,6 +488,12 @@ add_test_executable(mxs1319.cpp mxs1319 replication LABELS MySQLAuth REPL_BACKEN # https://jira.mariadb.org/browse/MXS-1418 add_test_executable(mxs1418.cpp mxs1418 replication LABELS maxscale REPL_BACKEND) +# MXS-1295: MaxScale's readwritesplit router does not take into account the fact +# that stored procedure call may change the value of a user variable +# +# https://jira.mariadb.org/browse/MXS-1295 +add_test_executable(mxs1295_sp_call.cpp mxs1295_sp_call mxs1295 LABELS maxscale REPL_BACKEND) + # 'namedserverfilter' test add_test_executable(namedserverfilter.cpp namedserverfilter namedserverfilter LABELS namedserverfilter LIGHT REPL_BACKEND) diff --git a/maxscale-system-test/cnf/maxscale.cnf.template.mxs1295 b/maxscale-system-test/cnf/maxscale.cnf.template.mxs1295 new file mode 100644 index 000000000..b5cb77c4e --- /dev/null +++ b/maxscale-system-test/cnf/maxscale.cnf.template.mxs1295 @@ -0,0 +1,48 @@ +[maxscale] +threads=###threads### + +[MySQL Monitor] +type=monitor +module=mysqlmon +###repl51### +servers=server1,server2 +user=maxskysql +passwd=skysql +monitor_interval=1000 + +[RW Split Router] +type=service +router=readwritesplit +servers=server1,server2 +user=maxskysql +passwd=skysql +strict_multi_stmt=false +strict_sp_calls=true + +[RW Split Listener] +type=listener +service=RW Split Router +protocol=MySQLClient +port=4006 + +[CLI] +type=service +router=cli + +[CLI Listener] +type=listener +service=CLI +protocol=maxscaled +socket=default + +[server1] +type=server +address=###node_server_IP_1### +port=###node_server_port_1### +protocol=MySQLBackend + +[server2] +type=server +address=###node_server_IP_2### +port=###node_server_port_2### +protocol=MySQLBackend diff --git a/maxscale-system-test/mxs1295_sp_call.cpp b/maxscale-system-test/mxs1295_sp_call.cpp new file mode 100644 index 000000000..ae4292cf4 --- /dev/null +++ b/maxscale-system-test/mxs1295_sp_call.cpp @@ -0,0 +1,44 @@ +/** + * Test for MXS-1295: https://jira.mariadb.org/browse/MXS-1295 + */ +#include "testconnections.h" + +const char sp_sql[] = + "DROP PROCEDURE IF EXISTS multi;" + "CREATE PROCEDURE multi()" + "BEGIN" + " SELECT @@server_id;" + "END"; + +int get_server_id(MYSQL* conn) +{ + char value[200] = ""; + find_field(conn, "SELECT @@server_id", "@@server_id", value); + return atoi(value); +} + +int main(int argc, char *argv[]) +{ + TestConnections test(argc, argv); + + test.connect_maxscale(); + test.repl->connect(); + + test.tprintf("Create the stored procedure and check that it works"); + test.try_query(test.repl->nodes[0], sp_sql); + test.try_query(test.repl->nodes[0], "CALL multi()"); + + test.tprintf("Check that queries after a CALL command get routed to the master"); + + int master = get_server_id(test.repl->nodes[0]); + int slave = get_server_id(test.repl->nodes[1]); + int result = get_server_id(test.conn_rwsplit); + + test.add_result(result != slave, "The query should be routed to a slave(%d): %d", slave, result); + test.try_query(test.conn_rwsplit, "USE test"); + test.try_query(test.conn_rwsplit, "CALL multi()"); + result = get_server_id(test.conn_rwsplit); + test.add_result(result != master, "The query should be routed to the master(%d): %d", master, result); + + return test.global_result; +} From f5cbd4a0bc2a1196c6516fb4ef96a92481652029 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 20 Sep 2017 12:17:22 +0300 Subject: [PATCH 03/10] Fix links The link syntax was the wrong way around. --- .../MaxScale-2.1.8-Release-Notes.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/Release-Notes/MaxScale-2.1.8-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.8-Release-Notes.md index 167b0ec3e..716a2ebd3 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.8-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.8-Release-Notes.md @@ -23,14 +23,14 @@ report at [Jira](https://jira.mariadb.org). [Here is a list of bugs fixed in MaxScale 2.1.8.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20%3D%202.1.8) -* (MXS-1421)[https://jira.mariadb.org/browse/MXS-1421] Even though limit is reached, maxrows continues to buffer resultset. -* (MXS-1418)[https://jira.mariadb.org/browse/MXS-1418] remove server does not drain node -* (MXS-1414)[https://jira.mariadb.org/browse/MXS-1414] About Presistent Connection Mysql Gone away -* (MXS-1412)[https://jira.mariadb.org/browse/MXS-1412] Performance issue with MaxRows filter -* (MXS-1411)[https://jira.mariadb.org/browse/MXS-1411] error : (46) [maxrows] Received data from the backend although we were expecting nothing. -* (MXS-1409)[https://jira.mariadb.org/browse/MXS-1409] maxadmin socket with port results in help -* (MXS-1400)[https://jira.mariadb.org/browse/MXS-1400] Crash with OpenSSL 1.1 -* (MXS-1396)[https://jira.mariadb.org/browse/MXS-1396] Persistent connections hang with Percona Server 5.6.37-82.2-log +* [MXS-1421](https://jira.mariadb.org/browse/MXS-1421) Even though limit is reached, maxrows continues to buffer resultset. +* [MXS-1418](https://jira.mariadb.org/browse/MXS-1418) remove server does not drain node +* [MXS-1414](https://jira.mariadb.org/browse/MXS-1414) About Presistent Connection Mysql Gone away +* [MXS-1412](https://jira.mariadb.org/browse/MXS-1412) Performance issue with MaxRows filter +* [MXS-1411](https://jira.mariadb.org/browse/MXS-1411) error : (46) [maxrows] Received data from the backend although we were expecting nothing. +* [MXS-1409](https://jira.mariadb.org/browse/MXS-1409) maxadmin socket with port results in help +* [MXS-1400](https://jira.mariadb.org/browse/MXS-1400) Crash with OpenSSL 1.1 +* [MXS-1396](https://jira.mariadb.org/browse/MXS-1396) Persistent connections hang with Percona Server 5.6.37-82.2-log ## Packaging From 2067079a44caa347f838185fd19f9bd914016178 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 20 Sep 2017 12:31:02 +0300 Subject: [PATCH 04/10] Update ChangeLog and Upgrading --- Documentation/Changelog.md | 1 + Documentation/Upgrading/Upgrading-To-MaxScale-2.1.md | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index 4a5d6f8a2..9ad2c4348 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -21,6 +21,7 @@ * MaxScale now supports IPv6 For more details, please refer to: +* [MariaDB MaxScale 2.1.9 Release Notes](Release-Notes/MaxScale-2.1.9-Release-Notes.md) * [MariaDB MaxScale 2.1.8 Release Notes](Release-Notes/MaxScale-2.1.8-Release-Notes.md) * [MariaDB MaxScale 2.1.7 Release Notes](Release-Notes/MaxScale-2.1.7-Release-Notes.md) * [MariaDB MaxScale 2.1.6 Release Notes](Release-Notes/MaxScale-2.1.6-Release-Notes.md) diff --git a/Documentation/Upgrading/Upgrading-To-MaxScale-2.1.md b/Documentation/Upgrading/Upgrading-To-MaxScale-2.1.md index 8bdbeedb3..a8095ec1f 100644 --- a/Documentation/Upgrading/Upgrading-To-MaxScale-2.1.md +++ b/Documentation/Upgrading/Upgrading-To-MaxScale-2.1.md @@ -7,6 +7,7 @@ For more information about MariaDB MaxScale 2.1, please refer to the [ChangeLog](../Changelog.md). For a complete list of changes in MaxScale 2.1, refer to the +[MaxScale 2.1.9 Release Notes](../Release-Notes/MaxScale-2.1.9-Release-Notes.md). [MaxScale 2.1.8 Release Notes](../Release-Notes/MaxScale-2.1.8-Release-Notes.md). [MaxScale 2.1.7 Release Notes](../Release-Notes/MaxScale-2.1.7-Release-Notes.md). [MaxScale 2.1.6 Release Notes](../Release-Notes/MaxScale-2.1.6-Release-Notes.md). From 9c0dbb5511ad66d4581c6cebeae14b879f8a21aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Sep 2017 11:17:27 +0300 Subject: [PATCH 05/10] Add 2.1.9 release notes Added 2.1.9 release notes. --- .../MaxScale-2.1.9-Release-Notes.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md diff --git a/Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md new file mode 100644 index 000000000..badf5c728 --- /dev/null +++ b/Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md @@ -0,0 +1,44 @@ +# MariaDB MaxScale 2.1.9 Release Notes + +Release 2.1.9 is a GA release. + +This document describes the changes in release 2.1.9, when compared to release +[2.1.8](MaxScale-2.1.8-Release-Notes.md). + +If you are upgrading from release 2.0, please also read the following release +notes: + +* [2.1.8](./MaxScale-2.1.8-Release-Notes.md) +* [2.1.7](./MaxScale-2.1.7-Release-Notes.md) +* [2.1.6](./MaxScale-2.1.6-Release-Notes.md) +* [2.1.5](./MaxScale-2.1.5-Release-Notes.md) +* [2.1.4](./MaxScale-2.1.4-Release-Notes.md) +* [2.1.3](./MaxScale-2.1.3-Release-Notes.md) +* [2.1.2](./MaxScale-2.1.2-Release-Notes.md) +* [2.1.1](./MaxScale-2.1.1-Release-Notes.md) +* [2.1.0](./MaxScale-2.1.0-Release-Notes.md) + +For any problems you encounter, please consider submitting a bug report at +[Jira](https://jira.mariadb.org). + +## Bug fixes + +[Here is a list of bugs fixed in MaxScale 2.1.9.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20%3D%202.1.9) + +* [MXS-1377](https://jira.mariadb.org/browse/MXS-1377) maxscale doesn't cleanup pid file on startup error +* [MXS-1295](https://jira.mariadb.org/browse/MXS-1295) MaxScale's readwritesplit router does not take into account the fact that stored procedure call may change the value of a user variable + +## Packaging + +RPM and Debian packages are provided for the Linux distributions supported by +MariaDB Enterprise. + +Packages can be downloaded [here](https://mariadb.com/resources/downloads). + +## Source Code + +The source code of MaxScale is tagged at GitHub with a tag, which is identical +with the version of MaxScale. For instance, the tag of version X.Y.Z of MaxScale +is maxscale-X.Y.Z. + +The source code is available [here](https://github.com/mariadb-corporation/MaxScale). From b2d53a963a4d0130d01068fa4c40940473239ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Sep 2017 13:34:33 +0300 Subject: [PATCH 06/10] Fix the bug listing script The script had the Markdown links in the wrong order. --- Documentation/process.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/process.pl b/Documentation/process.pl index f325b96de..2f7194079 100755 --- a/Documentation/process.pl +++ b/Documentation/process.pl @@ -16,5 +16,5 @@ while (<>) my $issue = @parts[1]; my $desc = @parts[0]; - print "* ($issue)[https://jira.mariadb.org/browse/$issue] $desc\n"; + print "* [$issue](https://jira.mariadb.org/browse/$issue) $desc\n"; } From eb3a9667fc714b5c1de0dfde1f19c83b574b7221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 20 Sep 2017 10:19:51 +0300 Subject: [PATCH 07/10] Discard connections on interrupted COM_CHANGE_USER Close the connection if a COM_QUIT is received while the COM_CHANGE_USER is in progress. --- .../protocol/MySQL/MySQLBackend/mysql_backend.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c index 5999c4052..32c292301 100644 --- a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c +++ b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c @@ -1027,12 +1027,11 @@ static int gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue) if (MYSQL_IS_COM_QUIT((uint8_t*)GWBUF_DATA(queue))) { /** The COM_CHANGE_USER was already sent but the session is already - * closing. We ignore the COM_QUIT in the hopes that the response - * to the COM_CHANGE_USER comes before the DCB is closed. If the - * DCB is closed before the response arrives, the connection will - * not qualify the persistent connection pool. */ - MXS_INFO("COM_QUIT received while COM_CHANGE_USER is in progress, ignoring"); + * closing. */ + MXS_INFO("COM_QUIT received while COM_CHANGE_USER is in progress, closing pooled connection"); gwbuf_free(queue); + poll_fake_hangup_event(dcb); + rc = 0; } else { @@ -1044,8 +1043,9 @@ static int gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue) */ MXS_INFO("COM_CHANGE_USER in progress, appending query to queue"); backend_protocol->stored_query = gwbuf_append(backend_protocol->stored_query, queue); + rc = 1; } - return 1; + return rc; } /** From db7e2c2ffbbd3fa5c11fca9e65763cc4041e1675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Sep 2017 09:51:58 +0300 Subject: [PATCH 08/10] Use `/usr/bin/env perl` instead of `/bin/perl` This allows Perl to be installed in other locations. --- Documentation/process.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/process.pl b/Documentation/process.pl index 2f7194079..fd2f4b3db 100755 --- a/Documentation/process.pl +++ b/Documentation/process.pl @@ -1,4 +1,4 @@ -#!/bin/perl +#!/usr/bin/env perl # Discard the CSV headers <>; From c015adfe9253981bc43c3d57202837d731e02da3 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 21 Sep 2017 09:56:57 +0300 Subject: [PATCH 09/10] Update 2.1 release notes --- Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md index badf5c728..d3d9bdf85 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.9-Release-Notes.md @@ -25,6 +25,7 @@ For any problems you encounter, please consider submitting a bug report at [Here is a list of bugs fixed in MaxScale 2.1.9.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20%3D%202.1.9) +* [MXS-1435](https://jira.mariadb.org/browse/MXS-1435) Persistent connections can hang on COM_QUIT * [MXS-1377](https://jira.mariadb.org/browse/MXS-1377) maxscale doesn't cleanup pid file on startup error * [MXS-1295](https://jira.mariadb.org/browse/MXS-1295) MaxScale's readwritesplit router does not take into account the fact that stored procedure call may change the value of a user variable From 8d136d7979f1393d6d0920f9705c18005a96df70 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 21 Sep 2017 10:11:13 +0300 Subject: [PATCH 10/10] Scripts work without . in the PATH Scripts work without . in the path and also if invoked from anywhere. --- Documentation/list_fixed_bugs.sh | 5 ++++- Documentation/list_fixed_issues.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/list_fixed_bugs.sh b/Documentation/list_fixed_bugs.sh index 8be27538f..6c8ed1b73 100755 --- a/Documentation/list_fixed_bugs.sh +++ b/Documentation/list_fixed_bugs.sh @@ -7,5 +7,8 @@ then exit 1 fi +# Script location +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + version=$1 -curl -s "https://jira.mariadb.org/sr/jira.issueviews:searchrequest-csv-current-fields/temp/SearchRequest.csv?jqlQuery=project+%3D+MXS+AND+issuetype+%3D+Bug+AND+status+%3D+Closed+AND+fixVersion+%3D+$version" | process.pl +curl -s "https://jira.mariadb.org/sr/jira.issueviews:searchrequest-csv-current-fields/temp/SearchRequest.csv?jqlQuery=project+%3D+MXS+AND+issuetype+%3D+Bug+AND+status+%3D+Closed+AND+fixVersion+%3D+$version" | $DIR/process.pl diff --git a/Documentation/list_fixed_issues.sh b/Documentation/list_fixed_issues.sh index 19707a3c4..9cab8dd8d 100755 --- a/Documentation/list_fixed_issues.sh +++ b/Documentation/list_fixed_issues.sh @@ -7,5 +7,8 @@ then exit 1 fi +# Script location +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + version=$1 -curl -s "https://jira.mariadb.org/sr/jira.issueviews:searchrequest-csv-current-fields/temp/SearchRequest.csv?jqlQuery=project+%3D+MXS+AND+issuetype+%21%3D+Bug+AND+status+%3D+Closed+AND+fixVersion+%3D+$version"|process.pl +curl -s "https://jira.mariadb.org/sr/jira.issueviews:searchrequest-csv-current-fields/temp/SearchRequest.csv?jqlQuery=project+%3D+MXS+AND+issuetype+%21%3D+Bug+AND+status+%3D+Closed+AND+fixVersion+%3D+$version" | $DIR/process.pl