Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä
2018-06-25 09:34:55 +03:00
7 changed files with 66 additions and 129 deletions

View File

@ -34,6 +34,7 @@ For more details, please refer to:
the master. There is also limited capability for rejoining nodes.
For more details, please refer to:
* [MariaDB MaxScale 2.2.10 Release Notes](Release-Notes/MaxScale-2.2.10-Release-Notes.md)
* [MariaDB MaxScale 2.2.9 Release Notes](Release-Notes/MaxScale-2.2.9-Release-Notes.md)
* [MariaDB MaxScale 2.2.8 Release Notes](Release-Notes/MaxScale-2.2.8-Release-Notes.md)
* [MariaDB MaxScale 2.2.7 Release Notes](Release-Notes/MaxScale-2.2.7-Release-Notes.md)

View File

@ -0,0 +1,47 @@
# MariaDB MaxScale 2.2.10 Release Notes -- 2018-06-
Release 2.2.10 is a GA release.
This document describes the changes in release 2.2.10, when compared to
release 2.2.9.
For any problems you encounter, please consider submitting a bug
report at [Jira](https://jira.mariadb.org).
## Bug fixes
* [MXS-1935](https://jira.mariadb.org/browse/MXS-1935) PREPARE ... FROM @var is not parsed
* [MXS-1932](https://jira.mariadb.org/browse/MXS-1932) MaxScale reads hidden files from maxscale.cnf.d
* [MXS-1931](https://jira.mariadb.org/browse/MXS-1931) Debug assertion in is_large_query fails
* [MXS-1930](https://jira.mariadb.org/browse/MXS-1930) New capability flags aren't used with MariaDB 10.3
* [MXS-1926](https://jira.mariadb.org/browse/MXS-1926) LOAD DATA LOCAL INFILE interrupted by slave shutdown
* [MXS-1920](https://jira.mariadb.org/browse/MXS-1920) # is not recognized as an until-end-of-line comment character
* [MXS-1913](https://jira.mariadb.org/browse/MXS-1913) fatal signal 11
* [MXS-1911](https://jira.mariadb.org/browse/MXS-1911) Certificate verification cannot be disabled for created listeners
* [MXS-1910](https://jira.mariadb.org/browse/MXS-1910) Only ssl_ca_cert should be required for servers
* [MXS-1907](https://jira.mariadb.org/browse/MXS-1907) Can't define ssl_verify_peer_certificate at runtime
* [MXS-1902](https://jira.mariadb.org/browse/MXS-1902) COM_CHANGE_USER lost connection
* [MXS-1891](https://jira.mariadb.org/browse/MXS-1891) DEALLOCATE PREPARE should route to all
* [MXS-1887](https://jira.mariadb.org/browse/MXS-1887) Using cache causes slow read from mysql server
* [MXS-1749](https://jira.mariadb.org/browse/MXS-1749) Process datadir is not always deleted on exit
* [MXS-872](https://jira.mariadb.org/browse/MXS-872) MaxScale doesn't understand roles
## 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 the Linux distributions supported
by MariaDB Enterprise.
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 X.Y.Z. Further, *master* always refers to the latest released non-beta version.
The source code is available [here](https://github.com/mariadb-corporation/MaxScale).

View File

@ -1,103 +0,0 @@
/**
* @file bug718.cpp bug718 (MXS-19) regression case REMOVED FROM TEST SUITE!! (because manuall Master setting breaks backend)
* trying to execute INSERTS from several paralell threads when monitors are disabled
*/
#include <iostream>
#include <unistd.h>
#include "testconnections.h"
#include "sql_t1.h"
#include "maxadmin_operations.h"
using namespace std;
TestConnections * Test;
void *thread1( void *ptr );
//void *thread2( void *ptr );
int iterations;
int db1_num = 0;
int main(int argc, char *argv[])
{
Test = new TestConnections(argc, argv);
iterations = (Test->smoke) ? 20 : 100;
Test->set_timeout(20);
int i;
Test->maxscales->execute_maxadmin_command(0, (char *) "set server server1 master");
Test->maxscales->execute_maxadmin_command(0, (char *) "set server server2 slave");
Test->maxscales->execute_maxadmin_command(0, (char *) "set server server3 slave");
Test->maxscales->execute_maxadmin_command(0, (char *) "set server server4 slave");
Test->maxscales->execute_maxadmin_command(0, (char *) "set server g_server1 master");
Test->maxscales->execute_maxadmin_command(0, (char *) "set server g_server2 slave");
Test->maxscales->execute_maxadmin_command(0, (char *) "set server g_server3 slave");
Test->maxscales->execute_maxadmin_command(0, (char *) "set server g_server4 slave");
Test->tprintf("Connecting to all MaxScale services\n");
Test->add_result(Test->maxscales->connect_maxscale(0), "Error connection to Maxscale\n");
//MYSQL * galera_rwsplit = open_conn(4016, Test->Maxscale_IP, Test->Maxscale_User, Test->Maxscale_Password);
Test->tprintf("executing show status 1000 times\n");
int ThreadsNum = 25;
pthread_t thread_v1[ThreadsNum];
int iret1[ThreadsNum];
for (i = 0; i < ThreadsNum; i ++)
{
iret1[i] = pthread_create(&thread_v1[i], NULL, thread1, NULL);
}
create_t1(Test->maxscales->conn_rwsplit[0]);
for (i = 0; i < iterations; i++)
{
Test->set_timeout(200);
insert_into_t1(Test->maxscales->conn_rwsplit[0], 4);
printf("i=%d\n", i);
}
Test->set_timeout(300);
for (i = 0; i < ThreadsNum; i ++)
{
pthread_join(thread_v1[i], NULL);
}
Test->maxscales->close_maxscale_connections(0);
Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;
return rval;
}
void *thread1( void *ptr )
{
MYSQL * conn = open_conn(Test->maxscales->rwsplit_port[0] , Test->maxscales->IP[0], Test->maxscales->user_name, Test->maxscales->password,
Test->ssl);
MYSQL * g_conn = open_conn(4016 , Test->maxscales->IP[0], Test->maxscales->user_name, Test->maxscales->password, Test->ssl);
char sql[1034];
sprintf(sql, "CREATE DATABASE IF NOT EXISTS test%d;", db1_num);
execute_query(conn, sql);
sprintf(sql, "USE test%d", db1_num);
execute_query(conn, sql);
create_t1(conn);
create_t1(g_conn);
for (int i = 0; i < iterations; i++)
{
insert_into_t1(conn, 4);
insert_into_t1(g_conn, 4);
if ((i / 100) * 100 == i)
{
printf("Iteration %d\n", i);
fflush(stdout);
}
}
return NULL;
}

View File

@ -27,25 +27,6 @@ using std::stringstream;
namespace
{
void sleep(int s)
{
cout << "Sleeping " << s << " times 1 second" << flush;
do
{
::sleep(1);
cout << "." << flush;
--s;
}
while (s > 0);
cout << endl;
}
}
namespace
{
void create_table(TestConnections& test)
{
MYSQL* pConn = test.maxscales->conn_rwsplit[0];

View File

@ -8,6 +8,7 @@
int main(int argc, char *argv[])
{
Mariadb_nodes::require_gtid(true);
TestConnections test(argc, argv);
test.tprintf("Blocking master and checking that master failure is delayed at least once.");

View File

@ -77,6 +77,11 @@ std::string SessionCommand::to_string()
/** TODO: Create C++ versions of modutil functions */
GWBUF *buf = m_buffer.release();
if (!GWBUF_IS_CONTIGUOUS(buf))
{
buf = gwbuf_make_contiguous(buf);
}
if (modutil_extract_SQL(buf, &sql, &sql_len))
{
str.append(sql, sql_len);

View File

@ -55,14 +55,18 @@ static std::string extract_error(GWBUF* buffer)
* @param master_cmd Master's reply
* @param slave_cmd Slave's reply
*/
static void discard_if_response_differs(SRWBackend backend, uint8_t master_cmd, uint8_t slave_cmd)
static void discard_if_response_differs(SRWBackend backend, uint8_t master_response,
uint8_t slave_response, SSessionCommand sescmd)
{
if (master_cmd != slave_cmd)
if (master_response != slave_response)
{
uint8_t cmd = sescmd->get_command();
std::string query = sescmd->to_string();
MXS_WARNING("Slave server '%s': response (0x%02hhx) differs "
"from master's response(0x%02hhx). Closing slave "
"connection due to inconsistent session state.",
backend->name(), slave_cmd, master_cmd);
"from master's response (0x%02hhx) to %s: `%s`. "
"Closing slave connection due to inconsistent session state.",
backend->name(), slave_response, master_response, STRPACKETTYPE(cmd),
query.empty() ? "<no query>" : query.c_str());
backend->close(mxs::Backend::CLOSE_FATAL);
}
}
@ -77,6 +81,7 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
uint8_t cmd;
gwbuf_copy_data(*ppPacket, MYSQL_HEADER_LEN, 1, &cmd);
uint8_t command = backend->next_session_command()->get_command();
mxs::SSessionCommand sescmd = backend->next_session_command();
uint64_t id = backend->complete_session_command();
MXS_PS_RESPONSE resp = {};
bool discard = true;
@ -118,7 +123,7 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
for (SlaveResponseList::iterator it = m_slave_responses.begin();
it != m_slave_responses.end(); it++)
{
discard_if_response_differs(it->first, cmd, it->second);
discard_if_response_differs(it->first, cmd, it->second, sescmd);
}
m_slave_responses.clear();
@ -132,7 +137,7 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
}
else
{
discard_if_response_differs(backend, m_sescmd_responses[id], cmd);
discard_if_response_differs(backend, m_sescmd_responses[id], cmd, sescmd);
}
if (discard)