diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-09-09 08:33:08 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-09-09 08:33:08 +0200 |
commit | 06b7fce9f24116080168b924d17f71b979fc3a14 (patch) | |
tree | 5ff9f5684bb118abbee5a9fd3b838d0841661287 /scripts | |
parent | 1f2ff25eba6c089b2698cd0dab96155ccbf2afd2 (diff) | |
parent | 8494039757a2f6353cc161e7824aab4fe2312d2a (diff) | |
download | mariadb-git-06b7fce9f24116080168b924d17f71b979fc3a14.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/CMakeLists.txt | 13 | ||||
-rw-r--r-- | scripts/galera_recovery.sh | 3 | ||||
-rw-r--r-- | scripts/mysql_secure_installation.pl.in | 2 | ||||
-rw-r--r-- | scripts/mysql_secure_installation.sh | 2 | ||||
-rw-r--r-- | scripts/wsrep_sst_common.sh | 2 | ||||
-rw-r--r-- | scripts/wsrep_sst_rsync.sh | 3 | ||||
-rw-r--r-- | scripts/wsrep_sst_xtrabackup-v2.sh | 6 | ||||
-rw-r--r-- | scripts/wsrep_sst_xtrabackup.sh | 6 |
8 files changed, 24 insertions, 13 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index dd642487ede..2ef2a1758f7 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -242,6 +242,14 @@ ELSE() wsrep_sst_xtrabackup-v2 ) ENDIF() + IF (NOT WITHOUT_SERVER) + SET(SERVER_SCRIPTS + mysql_fix_extensions + mysqld_multi + mysqld_safe + mysqldumpslow + ) + ENDIF() # Configure this one, for testing, but do not install it. CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_config.pl.in ${CMAKE_CURRENT_BINARY_DIR}/mysql_config.pl ESCAPE_QUOTES @ONLY) @@ -249,7 +257,6 @@ ELSE() SET(BIN_SCRIPTS msql2mysql mysql_config - mysql_fix_extensions mysql_setpermission mysql_secure_installation mysqlaccess @@ -257,9 +264,7 @@ ELSE() mysql_find_rows mytop mysqlhotcopy - mysqldumpslow - mysqld_multi - mysqld_safe + ${SERVER_SCRIPTS} ${WSREP_BINARIES} ${SYSTEMD_SCRIPTS} ) diff --git a/scripts/galera_recovery.sh b/scripts/galera_recovery.sh index 0e5a42b1676..d734ceb7ac7 100644 --- a/scripts/galera_recovery.sh +++ b/scripts/galera_recovery.sh @@ -68,7 +68,8 @@ parse_arguments() { wsrep_recover_position() { # Redirect server's error log to the log file. - eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover 2> "$log_file" + eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover \ + --log-error="$log_file" ret=$? if [ $ret -ne 0 ]; then # Something went wrong, let us also print the error log so that it diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in index 188a6bd7104..32331c3d601 100644 --- a/scripts/mysql_secure_installation.pl.in +++ b/scripts/mysql_secure_installation.pl.in @@ -217,7 +217,7 @@ sub remove_remote_root { sub remove_test_database { print " - Dropping test database...\n"; - if (do_query("DROP DATABASE test;")) { + if (do_query("DROP DATABASE IF EXISTS test;")) { print " ... Success!\n"; } else { print " ... Failed! Not critical, keep moving...\n"; diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index 82ea1b60a17..2c3b2f8dc8c 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -332,7 +332,7 @@ remove_remote_root() { remove_test_database() { echo " - Dropping test database..." - do_query "DROP DATABASE test;" + do_query "DROP DATABASE IF EXISTS test;" if [ $? -eq 0 ]; then echo " ... Success!" else diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 5f67507b577..f173a861e85 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -188,7 +188,7 @@ wsrep_log_info() wsrep_cleanup_progress_file() { - [ -n "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null + [ -n "${SST_PROGRESS_FILE:-}" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true } wsrep_check_program() diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 7e895aa4eb2..10d6896accd 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -222,7 +222,8 @@ then [ "$OS" == "Linux" ] && count=$(grep -c processor /proc/cpuinfo) [ "$OS" == "Darwin" -o "$OS" == "FreeBSD" ] && count=$(sysctl -n hw.ncpu) - find . -maxdepth 1 -mindepth 1 -type d -print0 | xargs -I{} -0 -P $count \ + find . -maxdepth 1 -mindepth 1 -type d -not -name "lost+found" -print0 | \ + xargs -I{} -0 -P $count \ rsync --owner --group --perms --links --specials \ --ignore-times --inplace --recursive --delete --quiet \ $WHOLE_FILE_OPT --exclude '*/ib_logfile*' "$WSREP_SST_OPT_DATA"/{}/ \ diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index a836d5e0edd..63febe556da 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -689,6 +689,7 @@ then if [ $WSREP_SST_OPT_BYPASS -eq 0 ] then + usrst=0 if [[ -z $sst_ver ]];then wsrep_log_error "Upgrade joiner to 5.6.21 or higher for backup locks support" wsrep_log_error "The joiner is not supported for this version of donor" @@ -704,13 +705,14 @@ then itmpdir=$(mktemp -d) wsrep_log_info "Using $itmpdir as innobackupex temporary directory" - if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then + if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then INNOEXTRA+=" --user=$WSREP_SST_OPT_USER" + usrst=1 fi if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD" - else + elif [[ $usrst -eq 1 ]];then # Empty password, used for testing, debugging etc. INNOEXTRA+=" --password=" fi diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh index 2247edec7fd..22923ab3e88 100644 --- a/scripts/wsrep_sst_xtrabackup.sh +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -436,15 +436,17 @@ then if [ $WSREP_SST_OPT_BYPASS -eq 0 ] then + usrst=0 TMPDIR="${TMPDIR:-/tmp}" - if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then + if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then INNOEXTRA+=" --user=$WSREP_SST_OPT_USER" + usrst=1 fi if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD" - else + elif [[ $usrst -eq 1 ]];then # Empty password, used for testing, debugging etc. INNOEXTRA+=" --password=" fi |