[MDEV-13037] wsrep_sst_mysqldump checking wrong version of mysql client Created: 2017-06-08  Updated: 2017-08-09  Resolved: 2017-08-09

Status: Closed
Project: MariaDB Server
Component/s: Galera SST
Affects Version/s: 10.2.6
Fix Version/s: 10.2.8

Type: Bug Priority: Critical
Reporter: Mario Caruso Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 1
Labels: 10.2-ga, galera
Environment:

debian 9 (stretch) x64 , vmware guest , packages installed from apt repository , version of packages : 10.2.6+maria~stretch ; galera-3 25.3.20-stretch


Attachments: File patch.diff    
Issue Links:
Duplicate
is duplicated by MDEV-13283 mysqldump sst fails "this operation r... Closed

 Description   

when using mysqldump as sst method it fails with error
"this operation requires MySQL client version 10 or newer"

This happens because on line 59 of /usr/bin/wsrep_sst_mysqldump we have a check :

"if ! $MYSQL_CLIENT --version | grep 'Distrib 10.1' >/dev/null"

but the client is 10.2 so it doesnt match the grep expression ,
here is the output of mysqlclient --version :

mysql --version
mysql Ver 15.1 Distrib 10.2.6-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

a possible fix could be to change the condition to

"if ! $MYSQL_CLIENT --version | grep 'Distrib 10.' >/dev/null"

so that every 10. version is accepted



 Comments   
Comment by Jan Lindström (Inactive) [ 2017-08-09 ]

http://lists.askmonty.org/pipermail/commits/2017-August/011370.html

Comment by Andrii Nikitin (Inactive) [ 2017-08-09 ]

The patch looks good with me. In my understanding check of version is needed to make sure that mysqldump handles gtid properly, thus the script should not report error for any version bigger than 10.0

Comment by Jan Lindström (Inactive) [ 2017-08-09 ]

commit 86f9b7714791f45f386e9aaa6f469ada626cd69d
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Wed Aug 9 12:47:12 2017 +0300

MDEV-13037: wsrep_sst_mysqldump checking wrong version of mysql client

This happens because on line 59 of /usr/bin/wsrep_sst_mysqldump
we have a check :
"if ! $MYSQL_CLIENT --version | grep 'Distrib 10.1' >/dev/null"
but the client is 10.2 so it doesnt match the grep expression.

Fixed check to be:
"if ! $MYSQL_CLIENT --version | grep 'Distrib 10.' >/dev/null"
so that every 10. version is accepted.

Generated at Thu Feb 08 08:02:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.