From 2f0ef4ad31189dc1708aeadd94151c5cbb7f4aed Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Thu, 24 Sep 2015 14:35:48 +0300 Subject: [PATCH 1/6] Configuration files from older installations no longer overwrite existing files. --- etc/postrm.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/postrm.in b/etc/postrm.in index 7488ebe46..239715448 100755 --- a/etc/postrm.in +++ b/etc/postrm.in @@ -6,7 +6,7 @@ then rm -f /usr/lib/systemd/system/maxscale.service else # Copy and rename config from old location - if [ -f "/usr/local/mariadb-maxscale/etc/MaxScale.cnf" ] + if [ -f "/usr/local/mariadb-maxscale/etc/MaxScale.cnf" -a ! -f "/etc/maxscale.cnf" ] then cp "/usr/local/mariadb-maxscale/etc/MaxScale.cnf" "/etc/maxscale.cnf" fi From 58641712075698eae2cdc9c2b3edd9cbcdc6f540 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Fri, 25 Sep 2015 13:19:53 +0300 Subject: [PATCH 2/6] Renamed 1.1.1 to 1.2.0 upgrading document to Upgrading-To-MaxScale-1.2.md --- CMakeLists.txt | 4 ++-- Documentation/Documentation-Contents.md | 2 +- ...ding-To-MaxScale-1.2.0.md => Upgrading-To-MaxScale-1.2.md} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename Documentation/Upgrading/{Upgrading-To-MaxScale-1.2.0.md => Upgrading-To-MaxScale-1.2.md} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4627a3e43..7873493f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,8 +184,8 @@ execute_process(COMMAND perl ${CMAKE_SOURCE_DIR}/Documentation/format.pl ${CMAKE_SOURCE_DIR}/Documentation/Release-Notes/MaxScale-1.2.0-Release-Notes.md ${CMAKE_BINARY_DIR}/ReleaseNotes.txt) execute_process(COMMAND perl ${CMAKE_SOURCE_DIR}/Documentation/format.pl -${CMAKE_SOURCE_DIR}/Documentation/Upgrading/Upgrading-To-MaxScale-1.2.0.md - ${CMAKE_BINARY_DIR}/UpgradingToMaxScale120.txt) +${CMAKE_SOURCE_DIR}/Documentation/Upgrading/Upgrading-To-MaxScale-1.2.md + ${CMAKE_BINARY_DIR}/UpgradingToMaxScale12.txt) install(FILES ${CMAKE_BINARY_DIR}/Changelog.txt DESTINATION ${MAXSCALE_SHAREDIR}) diff --git a/Documentation/Documentation-Contents.md b/Documentation/Documentation-Contents.md index ddfd54ba4..14248e222 100644 --- a/Documentation/Documentation-Contents.md +++ b/Documentation/Documentation-Contents.md @@ -20,7 +20,7 @@ ## Upgrading MaxScale -- [Upgrading MaxScale from 1.1.1 to 1.2.0](Upgrading/Upgrading-To-MaxScale-1.2.0.md) +- [Upgrading MaxScale from 1.1.1 to 1.2](Upgrading/Upgrading-To-MaxScale-1.2.md) - [Upgrading MaxScale from 1.0.5 to 1.1.0](Upgrading/Upgrading-To-MaxScale-1.1.0.md) ## Reference diff --git a/Documentation/Upgrading/Upgrading-To-MaxScale-1.2.0.md b/Documentation/Upgrading/Upgrading-To-MaxScale-1.2.md similarity index 100% rename from Documentation/Upgrading/Upgrading-To-MaxScale-1.2.0.md rename to Documentation/Upgrading/Upgrading-To-MaxScale-1.2.md From 1e694a6c7d395c5800a38e8c5a7317f7aa19476f Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 25 Sep 2015 13:47:38 +0300 Subject: [PATCH 3/6] Debug messages logged to debug. --- server/modules/protocol/mysql_client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 372a42f38..f99b3d599 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -1808,8 +1808,8 @@ static int gw_error_client_event( } #if defined(SS_DEBUG) - LOGIF(LE, (skygw_log_write_flush( - LOGFILE_ERROR, + LOGIF(LD, (skygw_log_write_flush( + LOGFILE_DEBUG, "Client error event handling."))); #endif dcb_close(dcb); @@ -1897,8 +1897,8 @@ gw_client_hangup_event(DCB *dcb) goto retblock; } #if defined(SS_DEBUG) - LOGIF(LE, (skygw_log_write_flush( - LOGFILE_ERROR, + LOGIF(LD, (skygw_log_write_flush( + LOGFILE_DEBUG, "Client hangup error handling."))); #endif dcb_close(dcb); From 9efad8727a3e3a09e6f92f333f9db7c4e1100afe Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 25 Sep 2015 14:07:19 +0300 Subject: [PATCH 4/6] All warnings removed. Minimal changes to remove warnings when compiling. --- server/core/gateway.c | 2 +- server/core/test/testmemlog.c | 2 +- server/core/test/testspinlock.c | 14 +++++++------- server/modules/protocol/mysql_common.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/server/core/gateway.c b/server/core/gateway.c index 0907d6365..f0744cfd1 100644 --- a/server/core/gateway.c +++ b/server/core/gateway.c @@ -1670,7 +1670,7 @@ int main(int argc, char **argv) if(!daemon_mode) { strncat(errorbuffer, "\n", STRING_BUFFER_SIZE); - fprintf(stderr, errorbuffer); + fprintf(stderr, "%s", errorbuffer); } rc = MAXSCALE_BADCONFIG; diff --git a/server/core/test/testmemlog.c b/server/core/test/testmemlog.c index 1523ec8ec..d1cad08ae 100644 --- a/server/core/test/testmemlog.c +++ b/server/core/test/testmemlog.c @@ -67,7 +67,7 @@ int main() { MEMLOG *log, *log2; -int i; +long int i; long j; long long k; int failures = 0; diff --git a/server/core/test/testspinlock.c b/server/core/test/testspinlock.c index 14501cea5..ed8fa7214 100644 --- a/server/core/test/testspinlock.c +++ b/server/core/test/testspinlock.c @@ -151,11 +151,14 @@ test3_helper(void *data) // SPINLOCK *lck = (SPINLOCK *)data; int i; int n = *(int *)data; -struct timespec sleeptime; time_t rawtime; +#if defined(ADD_SOME_NANOSLEEP) +struct timespec sleeptime; + sleeptime.tv_sec = 0; sleeptime.tv_nsec = 1; +#endif while (1) { if (spinlock_acquire_nowait(&lck)) { @@ -185,7 +188,9 @@ time_t rawtime; active = 0; spinlock_release(&lck); for (i=0; i<(4*PROCESS_LOOP); i++); - // nanosleep(&sleeptime, NULL); +#if defined(ADD_SOME_NANOSLEEP) + nanosleep(&sleeptime, NULL); +#endif } spinlock_release(&lck); } @@ -199,11 +204,6 @@ int i; int tnum[THREADS]; time_t rawtime; -struct timespec sleeptime; - - sleeptime.tv_sec = 20; - sleeptime.tv_nsec = NANOTIME; - times_run = 0; active = 0; failures = 0; diff --git a/server/modules/protocol/mysql_common.c b/server/modules/protocol/mysql_common.c index b3dfc37be..354820d4a 100644 --- a/server/modules/protocol/mysql_common.c +++ b/server/modules/protocol/mysql_common.c @@ -2261,7 +2261,7 @@ char *create_auth_fail_str( } else if(errcode == MYSQL_FAILED_AUTH_SSL) { - sprintf(errstr, ferrstr); + sprintf(errstr, "%s", ferrstr); } else { From 490d9b3782bb8d87a9f793742eea48affff6016b Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Fri, 25 Sep 2015 16:08:14 +0300 Subject: [PATCH 5/6] Fixed installation problems. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7873493f8..1c8f62027 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,7 +190,7 @@ ${CMAKE_SOURCE_DIR}/Documentation/Upgrading/Upgrading-To-MaxScale-1.2.md install(FILES ${CMAKE_BINARY_DIR}/Changelog.txt DESTINATION ${MAXSCALE_SHAREDIR}) install(FILES ${CMAKE_BINARY_DIR}/ReleaseNotes.txt DESTINATION ${MAXSCALE_SHAREDIR}) -install(FILES ${CMAKE_BINARY_DIR}/UpgradingToMaxScale120.txt DESTINATION ${MAXSCALE_SHAREDIR}) +install(FILES ${CMAKE_BINARY_DIR}/UpgradingToMaxScale12.txt DESTINATION ${MAXSCALE_SHAREDIR}) install(FILES server/maxscale_template.cnf DESTINATION ${MAXSCALE_SHAREDIR}) if(WITH_MAXSCALE_CNF) install(FILES server/maxscale_template.cnf DESTINATION ${MAXSCALE_CONFDIR} RENAME maxscale.cnf.template) From df65ea0386768af8b0f7d00560663a838ee9d905 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Fri, 25 Sep 2015 16:08:46 +0300 Subject: [PATCH 6/6] Fix to MXS-303: https://mariadb.atlassian.net/browse/MXS-303 Fixed package names. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c8f62027..9bae1af40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,7 +262,11 @@ if(PACKAGE) set(CPACK_PACKAGE_VERSION_MINOR "${MAXSCALE_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${MAXSCALE_VERSION_PATCH}") set(CPACK_PACKAGE_CONTACT "MariaDB Corporation Ab") - set(CPACK_PACKAGE_FILE_NAME "maxscale-${MAXSCALE_VERSION}-${CPACK_PACKAGE_ARCHITECTURE}-${DISTRIB_SUFFIX}") + if(DISTRIB_SUFFIX) + set(CPACK_PACKAGE_FILE_NAME "maxscale-${MAXSCALE_VERSION}-${MAXSCALE_BUILD_NUMBER}.${DISTRIB_SUFFIX}.${CPACK_PACKAGE_ARCHITECTURE}") + else() + set(CPACK_PACKAGE_FILE_NAME "maxscale-${MAXSCALE_VERSION}-${MAXSCALE_BUILD_NUMBER}.${CPACK_PACKAGE_ARCHITECTURE}") + endif() set(CPACK_PACKAGE_NAME "maxscale") set(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab") set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/etc/DESCRIPTION)