From d301109b1a190efa5f52886b113019cdaa1574ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 4 Jul 2018 22:05:11 +0300 Subject: [PATCH 1/4] Update release document Use more precise git commands for pushing a single tag. --- maxscale-system-test/Documentation/RELEASE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maxscale-system-test/Documentation/RELEASE.md b/maxscale-system-test/Documentation/RELEASE.md index 7e97c0458..53cd40ab9 100644 --- a/maxscale-system-test/Documentation/RELEASE.md +++ b/maxscale-system-test/Documentation/RELEASE.md @@ -26,6 +26,10 @@ also the version number being changed. So, ensure that the `maxscale-x.y.z-ttN` has been created and pushed to the repository. +``` +git push origin refs/tags/maxscale-x.y.z-ttN +``` + **NOTE** The tentative suffix - `-ttN` - is **only** used when specifying the tag for the build, it must **not** be present in any other names or paths. @@ -140,7 +144,7 @@ the final tag ``` $ git checkout maxscale-x.y.z-ttN $ git tag -a -m "Tag for MaxScale x.y.z" maxscale-x.y.z -$ git push --tags origin +$ git push origin refs/tags/maxscale-x.y.z ``` and remove the tentative tag(s) ``` From bbf390929672acfec22da6136528685653638413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 4 Jul 2018 16:22:54 +0300 Subject: [PATCH 2/4] MXS-1958: Add test case The test case verifies that the problem exists. --- maxscale-system-test/CMakeLists.txt | 4 ++++ maxscale-system-test/mxs1958_insert_priv.cpp | 25 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 maxscale-system-test/mxs1958_insert_priv.cpp diff --git a/maxscale-system-test/CMakeLists.txt b/maxscale-system-test/CMakeLists.txt index a89006917..92e737493 100644 --- a/maxscale-system-test/CMakeLists.txt +++ b/maxscale-system-test/CMakeLists.txt @@ -946,6 +946,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-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) + configure_file(templates.h.in templates.h @ONLY) include(CTest) diff --git a/maxscale-system-test/mxs1958_insert_priv.cpp b/maxscale-system-test/mxs1958_insert_priv.cpp new file mode 100644 index 000000000..44d5a36eb --- /dev/null +++ b/maxscale-system-test/mxs1958_insert_priv.cpp @@ -0,0 +1,25 @@ + +#include "testconnections.h" + +int main(int argc, char** argv) +{ + TestConnections test(argc, argv); + + test.repl->connect(); + execute_query(test.repl->nodes[0], "CREATE USER 'insert_only'@'%%' IDENTIFIED BY 'insert_only'"); + execute_query(test.repl->nodes[0], "CREATE DATABASE insert_db"); + execute_query(test.repl->nodes[0], "CREATE TABLE insert_db.t1(id INT)"); + execute_query(test.repl->nodes[0], "GRANT INSERT ON insert_db.t1 TO 'insert_only'@'%%'"); + test.repl->sync_slaves(); + + MYSQL* conn = open_conn(test.maxscales->rwsplit_port[0], test.maxscales->IP[0], "insert_only", "insert_only", false); + test.assert(mysql_errno(conn) == 0, "User without SELECT privileges should be allowed to connect"); + mysql_close(conn); + + execute_query(test.repl->nodes[0], "DROP USER 'insert_only'@'%%'"); + execute_query(test.repl->nodes[0], "DROP DATABASE insert_db"); + test.repl->sync_slaves(); + test.repl->disconnect(); + + return test.global_result; +} From 7954de0da6a8f41ea007656b8b9c4b35476c8fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 4 Jul 2018 21:04:22 +0300 Subject: [PATCH 3/4] Always log commit ID There's no good reason to not include the commit ID in release build startup messages. --- server/core/gateway.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/core/gateway.cc b/server/core/gateway.cc index dc5e19a19..070432798 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -1990,12 +1990,9 @@ int main(int argc, char **argv) goto return_main; } - MXS_NOTICE("MariaDB MaxScale %s started", MAXSCALE_VERSION); + MXS_NOTICE("MariaDB MaxScale %s started (Commit: %s)", MAXSCALE_VERSION, MAXSCALE_COMMIT); MXS_NOTICE("MaxScale is running in process %i", getpid()); -#ifdef SS_DEBUG - MXS_NOTICE("Commit: %s", MAXSCALE_COMMIT); -#endif cleanup_old_process_datadirs(); if (!cnf->config_check) { From 9e039ed0249b198d8dc58ed0518eeb1fc48e2347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 4 Jul 2018 21:10:21 +0300 Subject: [PATCH 4/4] Fix typo in DEB install scripts The package suffix was wrong. --- BUILD/build_deb_local.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD/build_deb_local.sh b/BUILD/build_deb_local.sh index 897371fc0..0640673ef 100755 --- a/BUILD/build_deb_local.sh +++ b/BUILD/build_deb_local.sh @@ -76,5 +76,5 @@ if [ "$BUILD_RABBITMQ" == "yes" ] ; then cp _build/*.deb . cp *.deb .. fi -sudo dpkg -i ../maxscale*.dev +sudo dpkg -i ../maxscale*.deb set +x