Skip to content

Commit c72ed05

Browse files
ayurchenNirbhay Choubey
authored andcommitted
This commit
* improves MySQL client version check making it no less than required as opposed to exactly as required. * adds event table copying to ensure same results as with rsync SST.
1 parent 822c005 commit c72ed05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/wsrep_sst_mysqldump.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ then
5454
fi
5555

5656
# Check client version
57-
if ! $MYSQL_CLIENT --version | grep 'Distrib 5.5' >/dev/null
57+
CLIENT_MINOR=$(mysql --version | cut -d ' ' -f 6 | cut -d '.' -f 2)
58+
if [ $CLIENT_MINOR -lt "5" ]
5859
then
5960
$MYSQL_CLIENT --version >&2
6061
wsrep_log_error "this operation requires MySQL client version 5.5.x"
@@ -75,7 +76,7 @@ STOP_WSREP="SET wsrep_on=OFF;"
7576
MYSQLDUMP="$MYSQLDUMP $AUTH -S$WSREP_SST_OPT_SOCKET \
7677
--add-drop-database --add-drop-table --skip-add-locks --create-options \
7778
--disable-keys --extended-insert --skip-lock-tables --quick --set-charset \
78-
--skip-comments --flush-privileges --all-databases"
79+
--skip-comments --flush-privileges --all-databases --events"
7980

8081
# mysqldump cannot restore CSV tables, fix this issue
8182
CSV_TABLES_FIX="

0 commit comments

Comments
 (0)