diff --git a/Documentation/REST-API/API.md b/Documentation/REST-API/API.md index a57ad7646..02ce8bec7 100644 --- a/Documentation/REST-API/API.md +++ b/Documentation/REST-API/API.md @@ -232,7 +232,9 @@ English and it uses the server's local timezone. #### ETag An identifier for a specific version of a resource. The value of this header -changes whenever a resource is modified. +changes whenever a resource is modified via the REST API. It will not change if +an internal MaxScale event (e.g. server changing state or statistics being +updated) causes a change. When the client sends the `If-Match` or `If-None-Match` header, the provided value should be the value of the `ETag` header of an earlier GET. diff --git a/Documentation/Release-Notes/MaxScale-2.3.9-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.3.9-Release-Notes.md index 1a3d5ac90..934112ee6 100644 --- a/Documentation/Release-Notes/MaxScale-2.3.9-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.3.9-Release-Notes.md @@ -1,4 +1,4 @@ -# MariaDB MaxScale 2.3.9 Release Notes +# MariaDB MaxScale 2.3.9 Release Notes -- 2019-07-04 Release 2.3.9 is a GA release. @@ -15,7 +15,9 @@ report on [our Jira](https://jira.mariadb.org/projects/MXS). ## Bug fixes * [MXS-2582](https://jira.mariadb.org/browse/MXS-2582) Intermittent unknown statement handler errors from backends +* [MXS-2578](https://jira.mariadb.org/browse/MXS-2578) Maxscale RPM issue PCI Compliancy * [MXS-2575](https://jira.mariadb.org/browse/MXS-2575) PATCH with invalid credentials returns no result +* [MXS-2574](https://jira.mariadb.org/browse/MXS-2574) maxctrl alter user doesn't work on current user * [MXS-2569](https://jira.mariadb.org/browse/MXS-2569) No newline sent with large schemas * [MXS-2563](https://jira.mariadb.org/browse/MXS-2563) Failing debug assertion at rwsplitsession.cc:1129 : m_expected_responses == 0 * [MXS-2562](https://jira.mariadb.org/browse/MXS-2562) Oracle's MySQL Connector/ODBC gets packets out-of-order errors with .NET diff --git a/server/core/config.cc b/server/core/config.cc index 14c1bac2c..6c593c45d 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -2945,6 +2945,7 @@ void config_set_global_defaults() gateway.promoted_at = 0; gateway.load_persisted_configs = true; gateway.max_auth_errors_until_block = DEFAULT_MAX_AUTH_ERRORS_UNTIL_BLOCK; + gateway.users_refresh_time = USERS_REFRESH_TIME_DEFAULT; gateway.peer_hosts[0] = '\0'; gateway.peer_user[0] = '\0'; diff --git a/server/core/dcb.cc b/server/core/dcb.cc index 01b291c7a..e940962d4 100644 --- a/server/core/dcb.cc +++ b/server/core/dcb.cc @@ -1955,6 +1955,7 @@ static void dcb_hangup_foreach_worker(MXB_WORKER* worker, struct SERVER* server) { RoutingWorker* rworker = static_cast(worker); int id = rworker->id(); + DCB* old_current = this_thread.current_dcb; for (DCB* dcb = this_unit.all_dcbs[id]; dcb; dcb = dcb->thread.next) { @@ -1962,11 +1963,14 @@ static void dcb_hangup_foreach_worker(MXB_WORKER* worker, struct SERVER* server) { if (!dcb->dcb_errhandle_called) { + this_thread.current_dcb = dcb; dcb->func.hangup(dcb); dcb->dcb_errhandle_called = true; } } } + + this_thread.current_dcb = old_current; } /** @@ -2500,10 +2504,10 @@ void dcb_process_timeouts(int thr) if (idle > dcb->service->net_write_timeout * 10) { MXS_WARNING("network write timed out for '%s'@%s, ", - dcb->user ? dcb->user : "", - dcb->remote ? dcb->remote : ""); - dcb->session->close_reason = SESSION_CLOSE_TIMEOUT; - poll_fake_hangup_event(dcb); + dcb->user ? dcb->user : "", + dcb->remote ? dcb->remote : ""); + dcb->session->close_reason = SESSION_CLOSE_TIMEOUT; + poll_fake_hangup_event(dcb); } } } diff --git a/server/core/queryclassifier.cc b/server/core/queryclassifier.cc index dc781455e..ab9d97b20 100644 --- a/server/core/queryclassifier.cc +++ b/server/core/queryclassifier.cc @@ -956,8 +956,15 @@ QueryClassifier::current_target_t QueryClassifier::handle_multi_temp_and_load( bool QueryClassifier::query_continues_ps(uint8_t cmd, uint32_t stmt_id, GWBUF* buffer) { bool rval = false; + uint8_t prev_cmd = m_route_info.command(); - if (cmd == COM_STMT_FETCH) + if (prev_cmd == MXS_COM_STMT_SEND_LONG_DATA + && (cmd == MXS_COM_STMT_EXECUTE || cmd == MXS_COM_STMT_SEND_LONG_DATA)) + { + // PS execution must be sent to the same server where the data was sent + rval = true; + } + else if (cmd == COM_STMT_FETCH) { // COM_STMT_FETCH should always go to the same target as the COM_STMT_EXECUTE rval = true; diff --git a/server/modules/routing/readwritesplit/rwsplitsession.cc b/server/modules/routing/readwritesplit/rwsplitsession.cc index f451e46f3..39a00c0b5 100644 --- a/server/modules/routing/readwritesplit/rwsplitsession.cc +++ b/server/modules/routing/readwritesplit/rwsplitsession.cc @@ -440,14 +440,15 @@ void RWSplitSession::trx_replay_next_stmt() else { MXS_INFO("Checksum mismatch, transaction replay failed. Closing connection."); - modutil_send_mysql_err_packet(m_client, - 0, - 0, - 1927, - "08S01", + modutil_send_mysql_err_packet(m_client, 1, 0, 1927, "08S01", "Transaction checksum mismatch encountered " "when replaying transaction."); poll_fake_hangup_event(m_client); + + // Turn the replay flag back on to prevent queries from getting routed before the hangup we + // just added is processed. For example, this can happen if the error is sent and the client + // manages to send a COM_QUIT that gets processed before the fake hangup event. + m_is_replay_active = true; } } else