Merge branch '2.1' into 2.2

This commit is contained in:
Johan Wikman 2018-03-06 10:38:01 +02:00
commit 8bfb4f231a
6 changed files with 28 additions and 8 deletions

View File

@ -41,6 +41,8 @@ else
if [ $? != 0 ]
then
# We need zypper here
sudo zypper -n refresh
sudo zypper -n update
sudo zypper -n install gcc gcc-c++ ncurses-devel bison glibc-devel libgcc_s1 perl \
make libtool libopenssl-devel libaio libaio-devel flex \
pcre-devel git wget tcl libuuid-devel \
@ -56,6 +58,7 @@ else
else
# YUM!
sudo yum clean all
sudo yum update -y
sudo yum install -y --nogpgcheck gcc gcc-c++ ncurses-devel bison glibc-devel \
libgcc perl make libtool openssl-devel libaio libaio-devel libedit-devel \
libedit-devel systemtap-sdt-devel rpm-sign wget \

View File

@ -53,6 +53,7 @@ For more details, please refer to:
* MaxScale now supports IPv6
For more details, please refer to:
* [MariaDB MaxScale 2.1.14 Release Notes](Release-Notes/MaxScale-2.1.14-Release-Notes.md)
* [MariaDB MaxScale 2.1.13 Release Notes](Release-Notes/MaxScale-2.1.13-Release-Notes.md)
* [MariaDB MaxScale 2.1.12 Release Notes](Release-Notes/MaxScale-2.1.12-Release-Notes.md)
* [MariaDB MaxScale 2.1.11 Release Notes](Release-Notes/MaxScale-2.1.11-Release-Notes.md)

View File

@ -270,10 +270,14 @@ int Mariadb_nodes::change_master(int NewMaster, int OldMaster)
execute_query(nodes[i], (char *) "stop slave;");
}
}
execute_query(nodes[NewMaster], "STOP SLAVE");
execute_query(nodes[NewMaster], "RESET SLAVE ALL");
execute_query(nodes[NewMaster], create_repl_user);
execute_query(nodes[OldMaster], (char *) "reset master;");
find_field(nodes[NewMaster], (char *) "show master status", (char *) "File", &log_file[0]);
find_field(nodes[NewMaster], (char *) "show master status", (char *) "Position", &log_pos[0]);
execute_query(nodes[OldMaster], "reset master;");
find_field(nodes[NewMaster], "show master status", "File", &log_file[0]);
find_field(nodes[NewMaster], "show master status", "Position", &log_pos[0]);
for (i = 0; i < N; i++)
{
if (i != NewMaster)

View File

@ -13,7 +13,9 @@ typedef std::set<std::string> StringSet;
StringSet state(TestConnections& test, const char* name)
{
StringSet rval;
char* res = test.ssh_maxscale_output(true, "maxadmin list servers|grep \'%s\'", name);
int exit_code;
char* res = test.maxscales->ssh_node_output_f(0, true, &exit_code,
"maxadmin list servers|grep \'%s\'", name);
char* pipe = strrchr(res, '|');
if (res && pipe)
@ -67,6 +69,11 @@ int main(int argc, char** argv)
StringSet relay_master = {"Relay Master", "Slave", "Running"};
test.tprintf("Checking before stopping IO thread");
int exit_code;
char *output = test.maxscales->ssh_node_output(0, "maxadmin list servers", true, &exit_code);
test.tprintf("%s", output);
free(output);
test.add_result(state(test, "server1") != master, "server1 is not a master");
test.add_result(state(test, "server2") != slave, "server2 is not a slave");
test.add_result(state(test, "server3") != relay_master, "server3 is not a relay master");
@ -76,6 +83,9 @@ int main(int argc, char** argv)
sleep(10);
test.tprintf("Checking after stopping IO thread");
output = test.maxscales->ssh_node_output(0, "maxadmin list servers", true, &exit_code);
test.tprintf("%s", output);
free(output);
test.add_result(state(test, "server1") != master, "server1 is not a master");
test.add_result(state(test, "server2") != slave, "server2 is not a slave");
test.add_result(state(test, "server3") != relay_master, "server3 is not a relay master");

View File

@ -44,11 +44,11 @@
#define NEW_LOAD_DBUSERS_QUERY "SELECT u.user, u.host, d.db, u.select_priv, u.%s \
FROM mysql.user AS u LEFT JOIN mysql.db AS d \
ON (u.user = d.user AND u.host = d.host) WHERE u.plugin = '' %s \
ON (u.user = d.user AND u.host = d.host) WHERE u.plugin IN ('', 'mysql_native_password') %s \
UNION \
SELECT u.user, u.host, t.db, u.select_priv, u.%s \
FROM mysql.user AS u LEFT JOIN mysql.tables_priv AS t \
ON (u.user = t.user AND u.host = t.host) WHERE u.plugin = '' %s"
ON (u.user = t.user AND u.host = t.host) WHERE u.plugin IN ('', 'mysql_native_password') %s"
static int get_users(SERV_LISTENER *listener, bool skip_local);
static MYSQL *gw_mysql_init(void);
@ -640,7 +640,8 @@ static bool check_server_permissions(SERVICE *service, SERVER* server,
if (row && strcasecmp(row[0], "Y") != 0)
{
MXS_WARNING("[%s] User '%s' is missing the SHOW DATABASES privilege.",
MXS_WARNING("[%s] User '%s' is missing the SHOW DATABASES privilege. "
"This means that MaxScale cannot see all databases and authentication can fail.",
service->name, user);
}

View File

@ -11,5 +11,6 @@ if(AVRO_FOUND AND JANSSON_FOUND)
add_subdirectory(test)
endif()
else()
message(STATUS "No Avro C or Jansson libraries found, not building avrorouter.")
message(FATAL_ERROR "No Avro C or Jansson libraries found, cannot build avrorouter. "
"Use the -DBUILD_CDC=N option to `cmake` to disable building of the avrorouter.")
endif()