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..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. @@ -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 diff --git a/Documentation/Routers/ReadWriteSplit.md b/Documentation/Routers/ReadWriteSplit.md index c4e88d452..9579c26da 100644 --- a/Documentation/Routers/ReadWriteSplit.md +++ b/Documentation/Routers/ReadWriteSplit.md @@ -154,6 +154,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 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}) diff --git a/server/modules/authenticator/MySQLAuth/dbusers.cc b/server/modules/authenticator/MySQLAuth/dbusers.cc index 015fc7d56..61caff0de 100644 --- a/server/modules/authenticator/MySQLAuth/dbusers.cc +++ b/server/modules/authenticator/MySQLAuth/dbusers.cc @@ -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);