Merge branch '2.2' into 2.3
This commit is contained in:
@ -1084,4 +1084,10 @@ add_test_executable(mxs2043_select_for_update.cpp mxs2043_select_for_update repl
|
||||
# MXS-2054: Hybrid clusters
|
||||
add_test_executable(mxs2054_hybrid_cluster.cpp mxs2054_hybrid_cluster mxs2054_hybrid_cluster LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-2111: mysql.user sometimes has SHA1 in authentication_string instead of password
|
||||
add_test_executable(mxs2111_auth_string.cpp mxs2111_auth_string replication LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-2115: Automatic version_string detection
|
||||
add_test_executable(mxs2115_version_string.cpp mxs2115_version_string replication LABELS REPL_BACKEND)
|
||||
|
||||
configure_file(templates.h.in ${CMAKE_CURRENT_BINARY_DIR}/templates.h @ONLY)
|
||||
|
32
maxscale-system-test/mxs2111_auth_string.cpp
Normal file
32
maxscale-system-test/mxs2111_auth_string.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* MXS-2111: The password is stored in `authentication_string` instead of `password` due to MDEV-16774
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
TestConnections::require_repl_version("10.2.0");
|
||||
TestConnections test(argc, argv);
|
||||
|
||||
auto batch = [&](std::vector<std::string> queries){
|
||||
test.maxscales->connect();
|
||||
for (const auto& a: queries)
|
||||
{
|
||||
test.try_query(test.maxscales->conn_rwsplit[0], "%s", a.c_str());
|
||||
}
|
||||
test.maxscales->disconnect();
|
||||
};
|
||||
|
||||
batch({"CREATE USER 'test' IDENTIFIED BY 'test'",
|
||||
"GRANT SELECT ON *.* TO test",
|
||||
"SET PASSWORD FOR 'test' = PASSWORD('test')"});
|
||||
|
||||
MYSQL* conn = open_conn(test.maxscales->rwsplit_port[0], test.maxscales->IP[0], "test", "test");
|
||||
test.try_query(conn, "SELECT 1");
|
||||
mysql_close(conn);
|
||||
|
||||
batch({"DROP USER 'test'"});
|
||||
|
||||
return test.global_result;
|
||||
}
|
21
maxscale-system-test/mxs2115_version_string.cpp
Normal file
21
maxscale-system-test/mxs2115_version_string.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* MXS-2115: Automatic version string detection doesn't work
|
||||
*
|
||||
* When servers are available, the backend server and Maxscale should return the
|
||||
* same version string.
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
test.repl->connect();
|
||||
test.maxscales->connect();
|
||||
|
||||
std::string direct = mysql_get_server_info(test.repl->nodes[0]);
|
||||
std::string mxs = mysql_get_server_info(test.maxscales->conn_rwsplit[0]);
|
||||
test.expect(direct == mxs, "MaxScale sends wrong version: %s != %s", direct.c_str(), mxs.c_str());
|
||||
|
||||
return test.global_result;
|
||||
}
|
Reference in New Issue
Block a user