From b72a7a89262eeacac3f3fda3041b6607a57655b7 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 18 May 2018 13:45:21 +0300 Subject: [PATCH 1/5] Update 2.2.6 release notes --- .../Release-Notes/MaxScale-2.2.6-Release-Notes.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md index b151ce1b6..f1c6d77d5 100644 --- a/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md @@ -8,9 +8,18 @@ release 2.2.5. For any problems you encounter, please consider submitting a bug report at [Jira](https://jira.mariadb.org). +## New Features + +* It is now possible to configure the MariaDB Monitor to turn + on the read_only flag of a server it deems is a slave. + ## Bug fixes +* [MXS-1874](https://jira.mariadb.org/browse/MXS-1874) SET STATEMENT ... FOR is wrongly classified +* [MXS-1873](https://jira.mariadb.org/browse/MXS-1873) Errors with large session commands +* [MXS-1866](https://jira.mariadb.org/browse/MXS-1866) Prepared statements do not work * [MXS-1861](https://jira.mariadb.org/browse/MXS-1861) masking filter logs warnings with multistatements +* [MXS-1852](https://jira.mariadb.org/browse/MXS-1852) mysql_client_test test_bug17309863 failed * [MXS-1847](https://jira.mariadb.org/browse/MXS-1847) Race condition in server_get_parameter * [MXS-1846](https://jira.mariadb.org/browse/MXS-1846) Wrong packet number in KILL command error * [MXS-1843](https://jira.mariadb.org/browse/MXS-1843) Sporadic test_logthrottling failures on Ubuntu From bdde3c44d9390610e66801bca10e382d08980308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 18 May 2018 18:10:32 +0300 Subject: [PATCH 2/5] Document slave_selection_criteria and weightby interaction Documented how the slave_selection_criteria and server weights work. --- Documentation/Routers/ReadWriteSplit.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/Routers/ReadWriteSplit.md b/Documentation/Routers/ReadWriteSplit.md index 543501391..adfdca5b7 100644 --- a/Documentation/Routers/ReadWriteSplit.md +++ b/Documentation/Routers/ReadWriteSplit.md @@ -152,6 +152,30 @@ reported by the server itself. `LEAST_BEHIND_MASTER` does not take server weights into account when choosing a server. +#### Server Weights and `slave_selection_criteria` + +The following formula is used to calculate a score for a server when the +`weightby` parameter is defined. + +``` +score = x / w +``` + +`x` is the absolute value of the chosen metric (queries, connections) and +`w` is the weight of the server. The value of `w` is the relative weight +of the server in relation to all the servers configured for the +service. The server with the highest score that fulfills all other +criteria is chosen as the target server. + +Read the [configuration guide](../Getting-Started/Configuration-Guide.md#weightby) +for a more detailed example on how the weights are calculated. + +For `LEAST_CURRENT_OPERATIONS`, the metric is number of active queries on +the candidate server, for `LEAST_GLOBAL_CONNECTIONS` and +`LEAST_ROUTER_CONNECTIONS` it is the number of open connections and for +`LEAST_BEHIND_MASTER` it is the number of seconds a server is behind the +master. + #### Interaction Between `slave_selection_criteria` and `max_slave_connections` Depending on the value of `max_slave_connections`, the slave selection criteria From 7af9a500ac313aacc89e6eb9a1c4758b49d80270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 21 May 2018 08:49:25 +0300 Subject: [PATCH 3/5] MXS-1853: Treat MySQL 8.0 as 5.7 in authenticators Using the MySQL 5.7 syntax is required to get the authenticators to work with 8.0. --- server/modules/authenticator/MySQLAuth/dbusers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/modules/authenticator/MySQLAuth/dbusers.c b/server/modules/authenticator/MySQLAuth/dbusers.c index 8b79c7b3d..374620a6d 100644 --- a/server/modules/authenticator/MySQLAuth/dbusers.c +++ b/server/modules/authenticator/MySQLAuth/dbusers.c @@ -58,7 +58,8 @@ static bool get_hostname(DCB *dcb, char *client_hostname, size_t size); static char* get_new_users_query(const char *server_version, bool include_root) { - const char* password = strstr(server_version, "5.7.") ? MYSQL57_PASSWORD : MYSQL_PASSWORD; + const char* password = strstr(server_version, "5.7.") || strstr(server_version, "8.0.") + ? MYSQL57_PASSWORD : MYSQL_PASSWORD; const char *with_root = include_root ? "" : " AND u.user NOT IN ('root')"; size_t n_bytes = snprintf(NULL, 0, NEW_LOAD_DBUSERS_QUERY, password, with_root, password, with_root); From 540df997fbb6a5a951d4995e99808a7e1ba1efef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 21 May 2018 09:12:58 +0300 Subject: [PATCH 4/5] Remove unused templates file The file has not been used since the templates.h header was added. --- maxscale-system-test/utilities.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/maxscale-system-test/utilities.cmake b/maxscale-system-test/utilities.cmake index 6bd130c65..5bd8d6444 100644 --- a/maxscale-system-test/utilities.cmake +++ b/maxscale-system-test/utilities.cmake @@ -15,7 +15,6 @@ endfunction() # test set, the function should be called as follows: # add_test_executable(simple_test.cpp simple_test simple_config LABELS some_label) function(add_test_executable source name template) - file(APPEND templates "${name} ${template}\n") add_template(${name} ${template}) add_executable(${name} ${source}) target_link_libraries(${name} testcore) @@ -31,7 +30,6 @@ endfunction() # Same as add_test_executable, but do not add executable into tests list function(add_test_executable_notest source name template) - file(APPEND templates "${name} ${template}\n") add_template(${name} ${template}) add_executable(${name} ${source}) target_link_libraries(${name} testcore) @@ -39,7 +37,6 @@ endfunction() # Add a test which uses another test as the executable function(add_test_derived name executable template) - file(APPEND templates "${name} ${template}\n") add_template(${name} ${template}) add_test(NAME ${name} COMMAND ${CMAKE_BINARY_DIR}/${executable} ${name} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) @@ -55,7 +52,6 @@ endfunction() # The naming of the templates follow the same principles as add_test_executable. # also suitable for symlinks function(add_test_script name script template labels) - file(APPEND templates "${name} ${template}\n") add_template(${name} ${template}) add_test(NAME ${name} COMMAND ${CMAKE_SOURCE_DIR}/${script} ${name} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) From 76f32a38acb276141c9a47b51a77c7e30d258aba Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 21 May 2018 10:04:39 +0300 Subject: [PATCH 5/5] Update release date --- Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md index f1c6d77d5..5accd6f43 100644 --- a/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.2.6-Release-Notes.md @@ -1,4 +1,4 @@ -# MariaDB MaxScale 2.2.6 Release Notes -- 2018-05 +# MariaDB MaxScale 2.2.6 Release Notes -- 2018-05-21 Release 2.2.6 is a GA release.