Merge branch '2.2' into develop
This commit is contained in:
commit
bfd3d2975d
@ -3,6 +3,9 @@ if (BUILD_MAXCTRL)
|
||||
find_package(NodeJS)
|
||||
|
||||
if (NPM_FOUND AND NODEJS_FOUND AND NODEJS_VERSION VERSION_GREATER "6.0.0")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/version.js.in ${CMAKE_CURRENT_BINARY_DIR}/lib/version.js @ONLY)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/maxctrl/maxctrl
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.sh ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
@ -14,7 +14,9 @@
|
||||
var fs = require('fs')
|
||||
var program = require('yargs');
|
||||
|
||||
const maxctrl_version = '1.0.0';
|
||||
// Note: The version.js file is generated at configuation time. If you are
|
||||
// building in-source, manually create the file
|
||||
const maxctrl_version = require('./version.js').version;
|
||||
|
||||
program
|
||||
.version(maxctrl_version)
|
||||
|
14
maxctrl/lib/version.js.in
Normal file
14
maxctrl/lib/version.js.in
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
||||
*
|
||||
* Change Date: 2020-01-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
exports.version = "@MAXSCALE_VERSION@"
|
@ -1019,6 +1019,10 @@ add_test_executable(mxs1926_killed_server.cpp mxs1926_killed_server mxs1926_kill
|
||||
# https://jira.mariadb.org/browse/MXS-1932
|
||||
add_test_executable(mxs1932_hidden_cnf.cpp mxs1932_hidden_cnf replication LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-1949: Warning for user load failure logged even when service has no users
|
||||
# https://jira.mariadb.org/browse/MXS-1949
|
||||
add_test_executable(mxs1949_warn_user_injection.cpp mxs1949_warn_user_injection avro LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-1958: Users with insert-only privileges don't work
|
||||
# https://jira.mariadb.org/browse/MXS-1958
|
||||
add_test_executable(mxs1958_insert_priv.cpp mxs1958_insert_priv replication LABELS REPL_BACKEND)
|
||||
|
15
maxscale-system-test/mxs1949_warn_user_injection.cpp
Normal file
15
maxscale-system-test/mxs1949_warn_user_injection.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* MXS-1949: Warning for user load failure logged even when service has no users
|
||||
*
|
||||
* Check that the message is not logged when services have no servers and
|
||||
* 'inject_service_user' is enabled.
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
test.check_log_err(0, " No users were loaded but 'inject_service_user' is enabled", false);
|
||||
return test.global_result;
|
||||
}
|
@ -239,6 +239,15 @@ TestConnections::TestConnections(int argc, char *argv[]):
|
||||
maxscales->use_ipv6 = use_ipv6;
|
||||
maxscales->ssl = ssl;
|
||||
|
||||
// Stop MaxScale to prevent it from interfering with the replication setup process
|
||||
if (!maxscale::manual_debug)
|
||||
{
|
||||
for (int i = 0; i < maxscales->N; i++)
|
||||
{
|
||||
maxscales->stop(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (maxscale::required_repl_version.length())
|
||||
{
|
||||
int ver_repl_required = get_int_version(maxscale::required_repl_version);
|
||||
@ -646,11 +655,6 @@ void TestConnections::init_maxscale(int m)
|
||||
{
|
||||
const char * template_name = get_template_name(test_name);
|
||||
|
||||
if (!maxscale::manual_debug)
|
||||
{
|
||||
stop_maxscale(m);
|
||||
}
|
||||
|
||||
process_template(m, template_name, maxscales->access_homedir[m]);
|
||||
maxscales->ssh_node_f(m, true,
|
||||
"cp maxscale.cnf %s;rm -rf %s/certs;mkdir -m a+wrx %s/certs;",
|
||||
|
@ -32,7 +32,7 @@ typedef struct mlist_st
|
||||
bool mlist_deleted;
|
||||
size_t mlist_nodecount;
|
||||
size_t mlist_nodecount_max; /**< size limit. 0 == no limit */
|
||||
size_t mlist_versno;
|
||||
volatile size_t mlist_versno;
|
||||
bool mlist_flat;
|
||||
mlist_node_t* mlist_first;
|
||||
mlist_node_t* mlist_last;
|
||||
|
@ -576,6 +576,19 @@ static bool add_service_user(SERV_LISTENER *port)
|
||||
return rval;
|
||||
}
|
||||
|
||||
static bool service_has_servers(SERVICE* service)
|
||||
{
|
||||
for (SERVER_REF* s = service->dbref; s; s = s->next)
|
||||
{
|
||||
if (s->active)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Load MySQL authentication users
|
||||
*
|
||||
@ -632,9 +645,12 @@ static int mysql_auth_load_users(SERV_LISTENER *port)
|
||||
|
||||
if (injected)
|
||||
{
|
||||
MXS_NOTICE("[%s] No users were loaded but 'inject_service_user' is enabled. "
|
||||
"Enabling service credentials for authentication until "
|
||||
"database users have been successfully loaded.", service->name);
|
||||
if (service_has_servers(service))
|
||||
{
|
||||
MXS_NOTICE("[%s] No users were loaded but 'inject_service_user' is enabled. "
|
||||
"Enabling service credentials for authentication until "
|
||||
"database users have been successfully loaded.", service->name);
|
||||
}
|
||||
}
|
||||
else if (loaded == 0 && !first_load)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user