From f6cc7f1bdc56e57cf441f99f2c88ca92aeeebc11 Mon Sep 17 00:00:00 2001 From: Monty Date: Mon, 25 Apr 2016 15:37:24 +0300 Subject: Fixed failing test cases and compiler warnings - Fixed wait condition in kill_processlist-6619 - Updated Ssl_chiper for openssl tests - Added supression for valgrinds when using libcrypto - Fixed wrong argument to pthread_mutex in server_audit.c when compiling with debug - Adding missing debug_sync_update() to debug_sync.h - Added initializers to some variables and fixed error handling in jsonudf.cpp - Fixed cluster_filter_unpack_varchar which doesn't have a stable index type. - Updated compiler_warnings.supp --- support-files/compiler_warnings.supp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'support-files') diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index 47eb8a827f1..9f9215704ec 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -184,10 +184,10 @@ jemalloc/src/jemalloc\.c: set but not used # # Connect engine # -storage/connect/ha_connect\.cc: might be clobbered by ~longjmp~ -storage/connect/connect\.cc: might be clobbered by ~longjmp~ +storage/connect/ha_connect\.cc: might be clobbered by .*longjmp +storage/connect/connect\.cc: might be clobbered by .*longjmp storage/connect/filamvct\.cpp: ignoring return value of -storage/connect/filamvct\.cpp: might be clobbered by ~longjmp~ +storage/connect/filamvct\.cpp: might be clobbered by .*longjmp storage/connect/xindex\.cpp: ignoring return value of storage/connect/value\.cpp: always false -- cgit v1.2.1 From 064569906083b24fc980e044cbb3b3427768249f Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Mon, 27 Jun 2016 18:01:21 -0400 Subject: MDEV-10145: Systemd fails to start mysqld in multi-instance mode --defaults-xxx options must be placed before all other options in the command line. Also moved MYSQLD_OPTS at the end so that its options take precedence. --- support-files/mariadb@.service.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'support-files') diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in index fb3b4b5f41d..ff87b66bf3c 100644 --- a/support-files/mariadb@.service.in +++ b/support-files/mariadb@.service.in @@ -64,11 +64,15 @@ PermissionsStartOnly=true # This isn't a replacement for my.cnf. # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster -ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf +# Note: Place $MYSQLD_OPTS at the very end for its options to take precedence. + +ExecStart=/usr/sbin/mysqld --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf \ + $_WSREP_NEW_CLUSTER $MYSQLD_OPTS # Alternate: (remove ConditionPathExists above) # use [mysqld.INSTANCENAME] as sections in my.cnf # -# ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --defaults-group-suffix=%I +# ExecStart=/usr/sbin/mysqld --defaults-group-suffix=%I \ +# $_WSREP_NEW_CLUSTER $MYSQLD_OPTS KillMode=process KillSignal=SIGTERM -- cgit v1.2.1 From a6816995ee6cc3dc0508e35fc2da4921b53fb931 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Mon, 27 Jun 2016 18:03:24 -0400 Subject: MDEV-10004: Galera's pc.recovery process fails in 10.1 with systemd Galera recovery process works in two phases. In the first phase, mysqld is started as non-daemon with --wsrep-recover to recover and fetch the last logged global transaction ID. This ID is then used in second phase as the start position (--wsrep-start-position=XX) to start mysqld as daemon. As this process was implemented in mysqld_safe script, the recovery did not work when server was started using systemd. Fixed by introducing a shell script (wsrep_recovery.sh) that mimics the first phase of the recovery process. --- support-files/mariadb.service.in | 13 ++++++++++++- support-files/mariadb@.service.in | 22 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) (limited to 'support-files') diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in index b18674bea46..55202c696fb 100644 --- a/support-files/mariadb.service.in +++ b/support-files/mariadb.service.in @@ -48,6 +48,14 @@ CapabilityBoundingSet=CAP_IPC_LOCK # Execute pre and post scripts as root, otherwise it does it as User= PermissionsStartOnly=true +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to unset _WSREP_START_POSITION environment variable. +ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION" +ExecStartPre=/bin/sh -c "VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && \ + systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1" + # Needed to create system tables etc. # ExecStartPre=/usr/bin/mysql_install_db -u mysql @@ -57,9 +65,12 @@ PermissionsStartOnly=true # This isn't a replacement for my.cnf. # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster @SYSTEMD_EXECSTARTPRE@ -ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER +ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION @SYSTEMD_EXECSTARTPOST@ +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION" + KillMode=process KillSignal=SIGTERM diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in index ff87b66bf3c..18adf0e0eac 100644 --- a/support-files/mariadb@.service.in +++ b/support-files/mariadb@.service.in @@ -55,6 +55,21 @@ CapabilityBoundingSet=CAP_IPC_LOCK # Execute pre and post scripts as root, otherwise it does it as User= PermissionsStartOnly=true +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to unset _WSREP_START_POSITION%I environment variable. +ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I" +ExecStartPre=/bin/sh -c "VAR=`/usr/bin/galera_recovery \ + --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf`; [ $? -eq 0 ] && \ + systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1" +# Alternate: (remove ConditionPathExists above) +# use [mysqld.INSTANCENAME] as sections in my.cnf +# +#ExecStartPre=/bin/sh -c "VAR=`/usr/bin/galera_recovery \ +# --defaults-group-suffix=%I`; [ $? -eq 0 ] && \ +# systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1" + # Needed to create system tables etc. # ExecStartPre=/usr/bin/mysql_install_db -u mysql @@ -67,12 +82,15 @@ PermissionsStartOnly=true # Note: Place $MYSQLD_OPTS at the very end for its options to take precedence. ExecStart=/usr/sbin/mysqld --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf \ - $_WSREP_NEW_CLUSTER $MYSQLD_OPTS + $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS # Alternate: (remove ConditionPathExists above) # use [mysqld.INSTANCENAME] as sections in my.cnf # # ExecStart=/usr/sbin/mysqld --defaults-group-suffix=%I \ -# $_WSREP_NEW_CLUSTER $MYSQLD_OPTS +# $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS + +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I" KillMode=process KillSignal=SIGTERM -- cgit v1.2.1