From 3d02343a40cec0b1e91644024301f4b6bbd464e7 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 1 Feb 2017 15:07:53 +0200 Subject: [PATCH 1/5] Update date in release notes --- Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md index 684836f64..784db5670 100644 --- a/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md @@ -1,4 +1,4 @@ -# MariaDB MaxScale 2.0.4 Release Notes +# MariaDB MaxScale 2.0.4 Release Notes -- 2017-02-01 Release 2.0.4 is a GA release. From eb5e284a90931db590a8406bc45d44ee969c6c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 1 Feb 2017 17:47:28 +0200 Subject: [PATCH 2/5] Rephrase the schemarouter limitations The text was not very clear as to whether the prepared statements were actually supported. --- Documentation/About/Limitations.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/About/Limitations.md b/Documentation/About/Limitations.md index 3931b391f..860b3d81d 100644 --- a/Documentation/About/Limitations.md +++ b/Documentation/About/Limitations.md @@ -231,9 +231,8 @@ and routed. Here is a list of the current limitations. * The preparation of a prepared statement is routed to all servers. The execution of a prepared statement is routed to the first available server or - to the server pointed by a routing hint attached to the query. As text - protocol prepared statements are relatively rare, prepared statements can't be - considered as supported in schemarouter + to the server pointed by a routing hint attached to the query. In practice + this means that prepared statements aren't supported by the schemarouter. ## Avrorouter limitations (avrorouter) From 6ee257dc5f184b855e3e557a54e818fa174e9aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 3 Feb 2017 08:14:20 +0200 Subject: [PATCH 3/5] Only log an error if the binlog file exists The avrorouter logged an error every time it tried to open a file even if the file doesn't exist. --- server/modules/routing/avro/avro_file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/avro/avro_file.c b/server/modules/routing/avro/avro_file.c index a16f05665..c1d65b1b0 100644 --- a/server/modules/routing/avro/avro_file.c +++ b/server/modules/routing/avro/avro_file.c @@ -67,7 +67,12 @@ bool avro_open_binlog(const char *binlogdir, const char *file, int *dest) if ((fd = open(path, O_RDONLY)) == -1) { - MXS_ERROR("Failed to open binlog file %s.", path); + if (errno != ENOENT) + { + char err[STRERROR_BUFLEN]; + MXS_ERROR("Failed to open binlog file %s: %d, %s", path, errno, + strerror_r(errno, err, sizeof(err))); + } return false; } From c0f5124f6f1a16d93ec63a127d8222116a294496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 6 Feb 2017 16:35:40 +0200 Subject: [PATCH 4/5] Fix field name parsing in avrorouter The backtick was copied to the field name and converted to an underscore when the name was transformed into a valid Avro identifier. This caused one extra character to appear in the field name in the Avro schema files. --- server/modules/routing/avro/avro_schema.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/avro/avro_schema.c b/server/modules/routing/avro/avro_schema.c index dd5c1e9fc..9595e83b7 100644 --- a/server/modules/routing/avro/avro_schema.c +++ b/server/modules/routing/avro/avro_schema.c @@ -481,7 +481,15 @@ static const char *extract_field_name(const char* ptr, char* dest, size_t size) if (ptr > start) { /** Valid identifier */ - snprintf(dest, size, "%.*s", (int)(ptr - start), start); + size_t bytes = ptr - start; + + if (bt) + { + bytes--; + } + + memcpy(dest, start, bytes); + dest[bytes] = '\0'; make_valid_avro_identifier(dest); ptr = next_field_definition(ptr); From e3bed424ea881d4254602561de32b6e431723bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 6 Feb 2017 23:03:57 +0200 Subject: [PATCH 5/5] MXS-1123: Fix connection_timeout causing constant disconnections In a configuration with multiple services, one with connection_timeout and others without it, the connections to non-connection_timeout services would get immediately closed due to integer overflow. --- server/core/session.c | 4 +++- server/include/service.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/core/session.c b/server/core/session.c index be290256d..e6b98c975 100644 --- a/server/core/session.c +++ b/server/core/session.c @@ -1025,7 +1025,9 @@ void process_idle_sessions() while (all_session) { if (all_session->ses_is_in_use && - all_session->service && all_session->client_dcb && all_session->client_dcb->state == DCB_STATE_POLLING && + all_session->service && all_session->client_dcb && + all_session->client_dcb->state == DCB_STATE_POLLING && + all_session->service->conn_idle_timeout && hkheartbeat - all_session->client_dcb->last_read > all_session->service->conn_idle_timeout * 10) { dcb_close(all_session->client_dcb); diff --git a/server/include/service.h b/server/include/service.h index 144de3a29..c7e9c22d1 100644 --- a/server/include/service.h +++ b/server/include/service.h @@ -100,7 +100,7 @@ typedef struct server_ref_t #define SERVICE_MAX_RETRY_INTERVAL 3600 /*< The maximum interval between service start retries */ /** Value of service timeout if timeout checks are disabled */ -#define SERVICE_NO_SESSION_TIMEOUT LONG_MAX +#define SERVICE_NO_SESSION_TIMEOUT 0 /** * Parameters that are automatically detected but can also be configured by the @@ -149,7 +149,7 @@ typedef struct service SERVICE_REFRESH_RATE rate_limit; /**< The refresh rate limit for users table */ FILTER_DEF **filters; /**< Ordered list of filters */ int n_filters; /**< Number of filters */ - long conn_idle_timeout; /**< Session timeout in seconds */ + uint64_t conn_idle_timeout; /**< Session timeout in seconds */ char *weightby; struct service *next; /**< The next service in the linked list */ bool retry_start; /*< If starting of the service should be retried later */