From b33cd85b4db655da4069e62065fc9c333f03b242 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 10 Jun 2019 14:37:57 +0300 Subject: [PATCH 1/7] Update release notes and change log for 2.3.8 --- Documentation/Changelog.md | 1 + .../MaxScale-2.3.8-Release-Notes.md | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Documentation/Release-Notes/MaxScale-2.3.8-Release-Notes.md diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index d97505431..b59565b94 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -31,6 +31,7 @@ For more details, please refer to: +* [MariaDB MaxScale 2.3.8 Release Notes](Release-Notes/MaxScale-2.3.8-Release-Notes.md) * [MariaDB MaxScale 2.3.7 Release Notes](Release-Notes/MaxScale-2.3.7-Release-Notes.md) * [MariaDB MaxScale 2.3.6 Release Notes](Release-Notes/MaxScale-2.3.6-Release-Notes.md) * [MariaDB MaxScale 2.3.5 Release Notes](Release-Notes/MaxScale-2.3.5-Release-Notes.md) diff --git a/Documentation/Release-Notes/MaxScale-2.3.8-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.3.8-Release-Notes.md new file mode 100644 index 000000000..96595a8f1 --- /dev/null +++ b/Documentation/Release-Notes/MaxScale-2.3.8-Release-Notes.md @@ -0,0 +1,49 @@ +# MariaDB MaxScale 2.3.8 Release Notes + +Release 2.3.8 is a GA release. + +This document describes the changes in release 2.3.8, when compared to the +previous release in the same series. + +For any problems you encounter, please consider submitting a bug +report on [our Jira](https://jira.mariadb.org/projects/MXS). + +## Bug fixes + +* [MXS-2541](https://jira.mariadb.org/browse/MXS-2541) Crash with transaction_replay=true +* [MXS-2538](https://jira.mariadb.org/browse/MXS-2538) MaxScale sends wrong charset in some cases +* [MXS-2536](https://jira.mariadb.org/browse/MXS-2536) Hang on KILL /*QUERY*/ 1 +* [MXS-2525](https://jira.mariadb.org/browse/MXS-2525) before upgrade to 2.3, all works well ,after upgrade maxscale to 2.3.7,some programing drivers can not work well +* [MXS-2520](https://jira.mariadb.org/browse/MXS-2520) Readwritesplit won't connect to master for reads +* [MXS-2511](https://jira.mariadb.org/browse/MXS-2511) Maxscale c-connector version +* [MXS-2507](https://jira.mariadb.org/browse/MXS-2507) Hang on CREATE TABLE tab +* [MXS-2496](https://jira.mariadb.org/browse/MXS-2496) Service user with roles causes false warnings +* [MXS-2494](https://jira.mariadb.org/browse/MXS-2494) MySQLAuth load users query doesn't check mysql.user's plugin column for MariaDB 10.1+ +* [MXS-2491](https://jira.mariadb.org/browse/MXS-2491) Destructor dependency between different components of the log +* [MXS-2479](https://jira.mariadb.org/browse/MXS-2479) Don't throw error for PAM_TEXT_INFO in PAM conversation function +* [MXS-2473](https://jira.mariadb.org/browse/MXS-2473) Clarify documentation on regex-related options +* [MXS-2464](https://jira.mariadb.org/browse/MXS-2464) Crash in route_stored_query with ReadWriteSplit +* [MXS-2250](https://jira.mariadb.org/browse/MXS-2250) DESCRIBE on temporary table is routed to slave +* [MXS-2083](https://jira.mariadb.org/browse/MXS-2083) Maxadmin list servers gives a negative for the number of connections +* [MXS-1851](https://jira.mariadb.org/browse/MXS-1851) Using backend protocol as client protocol causes a crash +* [MXS-1700](https://jira.mariadb.org/browse/MXS-1700) Using MariaDBClient for backend protocol module causes a crash + +## Known Issues and Limitations + +There are some limitations and known issues within this version of MaxScale. +For more information, please refer to the [Limitations](../About/Limitations.md) document. + +## Packaging + +RPM and Debian packages are provided for supported the Linux distributions. + +Packages can be downloaded [here](https://mariadb.com/downloads/mariadb-tx/maxscale). + +## 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`. Further, the default branch is always the latest GA version +of MaxScale. + +The source code is available [here](https://github.com/mariadb-corporation/MaxScale). From 5f5e402a32e0dc8bd64b76ffbea7c09591be01f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 11 Jun 2019 00:09:26 +0300 Subject: [PATCH 2/7] Reconnect before find_field in mysqlmon_rejoin_manual This appears to fix the test failure but the reason why it worked before still remains a mystery. --- maxscale-system-test/mysqlmon_rejoin_manual.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maxscale-system-test/mysqlmon_rejoin_manual.cpp b/maxscale-system-test/mysqlmon_rejoin_manual.cpp index ec6ff9ba9..15b8ece6b 100644 --- a/maxscale-system-test/mysqlmon_rejoin_manual.cpp +++ b/maxscale-system-test/mysqlmon_rejoin_manual.cpp @@ -70,6 +70,7 @@ int main(int argc, char** argv) get_output(test); string gtid_old_master; + test.repl->connect(); if (find_field(test.repl->nodes[master_index], GTID_QUERY, GTID_FIELD, result_tmp) == 0) { gtid_old_master = result_tmp; @@ -119,9 +120,10 @@ int main(int argc, char** argv) test.maxscales->wait_for_monitor(); get_output(test); char result[100]; + test.repl->connect(); if (find_field(conn, sstatus_query.c_str(), "Master_Host", result) == 0) { - test.expect(strcmp(result, test.repl->IP[0]) == 0, + test.expect(strcmp(result, test.repl->IP[0]) == 0, "server3 did not rejoin the cluster (%s != %s).", result, test.repl->IP[0]); } else From 5adc8fa5bddcfe16fba68543e529c9d068885acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 11 Jun 2019 08:21:47 +0300 Subject: [PATCH 3/7] Add missing HEAVY labels to big tests --- maxscale-system-test/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/maxscale-system-test/CMakeLists.txt b/maxscale-system-test/CMakeLists.txt index 52b5acfc5..b869febe3 100644 --- a/maxscale-system-test/CMakeLists.txt +++ b/maxscale-system-test/CMakeLists.txt @@ -1075,7 +1075,7 @@ add_test_executable(mxs2057_systemd_watchdog.cpp mxs2057_systemd_watchdog mxs205 #add_test_executable_notest(long_test.cpp long_test_big replication LABELS readwritesplit REPL_BACKEND BIG_REPL_BACKEND UNSTABLE HEAVY) # Tries INSERTs with size close to 0x0ffffff * N -add_test_derived(different_size_rwsplit_big different_size_rwsplit replication LABELS readwritesplit UNSTABLE HEAVY REPL_BACKEND BIG_REPL_BACKEND UNSTABLE) +add_test_derived(different_size_rwsplit_big different_size_rwsplit replication LABELS readwritesplit REPL_BACKEND BIG_REPL_BACKEND UNSTABLE HEAVY ) # Check how Maxscale works in case of one slave failure, only one slave is configured add_test_derived(slave_failover_big slave_failover replication.one_slave LABELS readwritesplit REPL_BACKEND BIG_REPL_BACKEND UNSTABLE HEAVY) @@ -1106,11 +1106,11 @@ add_test_derived(rwsplit_connect_big rwsplit_connect replication LABELS readwrit # Regression cases for the bug "Hint filter don't work if listed before regex filter in configuration file" # (different filter sequence and configuration, but the same test, see .cnf for details) -add_test_derived(bug585_big bug587 bug585 LABELS regexfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE) -add_test_derived(bug587_big bug587 bug587 LABELS regexfilter hintfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE) -add_test_derived(bug587_1_big bug587 bug587_1 LABELS regexfilter hintfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE) +add_test_derived(bug585_big bug587 bug585 LABELS regexfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE HEAVY) +add_test_derived(bug587_big bug587 bug587 LABELS regexfilter hintfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE HEAVY) +add_test_derived(bug587_1_big bug587 bug587_1 LABELS regexfilter hintfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE HEAVY) # Regression case for the bug "Routing Hints route to server sometimes doesn't work" -add_test_derived(bug471_big bug471 bug471_big LABELS readwritesplit hintfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE) +add_test_derived(bug471_big bug471 bug471_big LABELS readwritesplit hintfilter BIG_REPL_BACKEND REPL_BACKEND UNSTABLE HEAVY) set_tests_properties(different_size_rwsplit_big PROPERTIES TIMEOUT 3600) set_tests_properties(different_size_rwsplit PROPERTIES TIMEOUT 3600) From ce3d7acf2d2d5cedeb0bd7bf108c055bb12cb00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 11 Jun 2019 08:32:28 +0300 Subject: [PATCH 4/7] Fix maxavrocheck path processing A null path could be given if realpath failed to resolve the name. This hides the actual reason of the failure making it harder to resolve it. --- avro/maxavrocheck.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/avro/maxavrocheck.c b/avro/maxavrocheck.c index e5951f3d2..90827ff02 100644 --- a/avro/maxavrocheck.c +++ b/avro/maxavrocheck.c @@ -120,8 +120,7 @@ int check_file(const char* filename) return rval; } -static struct option long_options[] = -{ +static struct option long_options[] = { {"verbose", no_argument, 0, 'v'}, {"dump", no_argument, 0, 'd'}, {"from", no_argument, 0, 'f'}, @@ -170,10 +169,14 @@ int main(int argc, char** argv) } int rval = 0; - char pathbuf[PATH_MAX + 1]; + for (int i = optind; i < argc; i++) { - if (check_file(realpath(argv[i], pathbuf))) + char pathbuf[PATH_MAX + 1]; + snprintf(pathbuf, sizeof(pathbuf), "%s", argv[i]); + realpath(argv[i], pathbuf); + + if (check_file(pathbuf)) { fprintf(stderr, "Failed to process file: %s\n", argv[i]); rval = 1; From 4716f5b48fe53fb51a96ef1ddc58d3618d270257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 11 Jun 2019 08:52:25 +0300 Subject: [PATCH 5/7] Fix buffer end pointer comparison in maxavro The buffer pointer can point to the end pointer if it is the last value in the buffer. --- avro/maxavro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avro/maxavro.c b/avro/maxavro.c index 9cf2e5aff..29cfb46f4 100644 --- a/avro/maxavro.c +++ b/avro/maxavro.c @@ -144,7 +144,7 @@ char* maxavro_read_string(MAXAVRO_FILE* file, size_t* size) if (maxavro_read_integer(file, &len)) { - if (file->buffer_ptr + len < file->buffer_end) + if (file->buffer_ptr + len <= file->buffer_end) { key = MXS_MALLOC(len + 1); if (key) From 5b14e28fc8b06a76122239a44e52e965001f50a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 11 Jun 2019 14:15:06 +0300 Subject: [PATCH 6/7] Fix maxavrocheck build failure on Ubuntu Trusty The return value of realpath should be checked even if it is pointless. --- avro/maxavrocheck.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avro/maxavrocheck.c b/avro/maxavrocheck.c index 90827ff02..1d0840d2b 100644 --- a/avro/maxavrocheck.c +++ b/avro/maxavrocheck.c @@ -173,8 +173,11 @@ int main(int argc, char** argv) for (int i = optind; i < argc; i++) { char pathbuf[PATH_MAX + 1]; - snprintf(pathbuf, sizeof(pathbuf), "%s", argv[i]); - realpath(argv[i], pathbuf); + + if (!realpath(argv[i], pathbuf)) + { + snprintf(pathbuf, sizeof(pathbuf), "%s", argv[i]); + } if (check_file(pathbuf)) { From 814ae196e9e6b2823e5e3ffac174ff5270e7d9d5 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 11 Jun 2019 20:14:58 +0300 Subject: [PATCH 7/7] qc_sqlite: Replace strncpy with memcpy On RHEL8 the former may give rise to incorrect error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation] --- query_classifier/qc_sqlite/qc_sqlite.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/query_classifier/qc_sqlite/qc_sqlite.cc b/query_classifier/qc_sqlite/qc_sqlite.cc index 5d09b5f45..c97176391 100644 --- a/query_classifier/qc_sqlite/qc_sqlite.cc +++ b/query_classifier/qc_sqlite/qc_sqlite.cc @@ -1702,7 +1702,7 @@ public: const Token* pDatabase = pName2->z ? pName1 : NULL; char name[pName->n + 1]; - strncpy(name, pName->z, pName->n); + memcpy(name, pName->z, pName->n); name[pName->n] = 0; QcAliases aliases; @@ -1710,7 +1710,7 @@ public: if (pDatabase) { char database[pDatabase->n + 1]; - strncpy(database, pDatabase->z, pDatabase->n); + memcpy(database, pDatabase->z, pDatabase->n); database[pDatabase->n] = 0; update_names(database, name, NULL, &aliases); @@ -1974,13 +1974,13 @@ public: const Token* pDatabase = pName2->z ? pName1 : NULL; char name[pName->n + 1]; - strncpy(name, pName->z, pName->n); + memcpy(name, pName->z, pName->n); name[pName->n] = 0; if (pDatabase) { char database[pDatabase->n + 1]; - strncpy(database, pDatabase->z, pDatabase->n); + memcpy(database, pDatabase->z, pDatabase->n); database[pDatabase->n] = 0; update_names(database, name, NULL, NULL); @@ -2177,14 +2177,14 @@ public: if (pDatabase) { - strncpy(database, pDatabase->z, pDatabase->n); + memcpy(database, pDatabase->z, pDatabase->n); database[pDatabase->n] = 0; zDatabase = database; } char table[pTable->n + 1]; - strncpy(table, pTable->z, pTable->n); + memcpy(table, pTable->z, pTable->n); table[pTable->n] = 0; update_names(zDatabase, table, NULL, NULL); @@ -2285,14 +2285,14 @@ public: if (pDatabase) { - strncpy(database, pDatabase->z, pDatabase->n); + memcpy(database, pDatabase->z, pDatabase->n); database[pDatabase->n] = 0; zDatabase = database; } char table[pName->n + 1]; - strncpy(table, pName->z, pName->n); + memcpy(table, pName->z, pName->n); table[pName->n] = 0; update_names(zDatabase, table, NULL, NULL); @@ -2415,7 +2415,7 @@ public: m_type_mask = QUERY_TYPE_WRITE; char zName[pName->n + 1]; - strncpy(zName, pName->z, pName->n); + memcpy(zName, pName->z, pName->n); zName[pName->n] = 0; update_names("*any*", zName, NULL, NULL); @@ -3127,7 +3127,7 @@ public: char database[pDatabase ? pDatabase->n + 1 : 0]; if (pDatabase) { - strncpy(database, pDatabase->z, pDatabase->n); + memcpy(database, pDatabase->z, pDatabase->n); database[pDatabase->n] = 0; zDatabase = database; } @@ -3137,7 +3137,7 @@ public: } char name[pName->n + 1]; - strncpy(name, pName->z, pName->n); + memcpy(name, pName->z, pName->n); name[pName->n] = 0; update_names(zDatabase, name, NULL, NULL); @@ -3336,7 +3336,7 @@ private: if (nDatabase) { - strncpy(fullname, zDatabase, nDatabase); + memcpy(fullname, zDatabase, nDatabase); fullname[nDatabase] = 0; strcat(fullname, "."); }