Commit c37ebaf6 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-30153 ad hoc client versions are confusing

try to make them less confusing for users.
Hopefully, if the version string will be changed like

- mariadb Ver 15.1 Distrib 10.11.2-MariaDB for Linux (x86_64)
+ mariadb from 10.11.2-MariaDB, client 15.1 for Linux (x86_64)

users will be less inclined to reply "15.1" to the question
"what mariadb version are you using?"
parent eb26bf6e
...@@ -1850,12 +1850,12 @@ static void usage(int version) ...@@ -1850,12 +1850,12 @@ static void usage(int version)
#else #else
const char* readline= "readline"; const char* readline= "readline";
#endif #endif
printf("%s Ver %s Distrib %s for %s (%s) using %s %s\n", printf("%s from %s, client %s for %s (%s) using %s %s\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE, my_progname, MYSQL_SERVER_VERSION, VER, SYSTEM_TYPE, MACHINE_TYPE,
readline, rl_library_version); readline, rl_library_version);
#else #else
printf("%s Ver %s Distrib %s for %s (%s), source revision %s\n", my_progname, VER, printf("%s from %s, client %s for %s (%s), source revision %s\n", my_progname,
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE,SOURCE_REVISION); MYSQL_SERVER_VERSION, VER, SYSTEM_TYPE, MACHINE_TYPE,SOURCE_REVISION);
#endif #endif
if (version) if (version)
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
static inline void print_version() static inline void print_version()
{ {
/* NOTE mysql.cc is not using this function! */ /* NOTE mysql.cc is not using this function! */
printf("%s Ver %s Distrib %s for %s (%s)\n", printf("%s from %s, client %s for %s (%s)\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); my_progname, MYSQL_SERVER_VERSION, VER, SYSTEM_TYPE, MACHINE_TYPE);
} }
#endif #endif
#endif /* _welcome_copyright_notice_h_ */ #endif /* _welcome_copyright_notice_h_ */
...@@ -1269,7 +1269,7 @@ DELIMITER ; ...@@ -1269,7 +1269,7 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
mariadb-binlog Ver VER Distrib DISTRIB for OS (ARCH) mariadb-binlog from #.#.#-MariaDB, client #.# for OS (ARCH)
# #
# Test --rewrite-db # Test --rewrite-db
# #
......
...@@ -608,7 +608,7 @@ eval SET GLOBAL SERVER_ID = $old_server_id; ...@@ -608,7 +608,7 @@ eval SET GLOBAL SERVER_ID = $old_server_id;
# #
# MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version # MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version
# #
replace_regex /.*mariadb-binlog(\.exe)? Ver .* Distrib .* for .* \([-_a-zA-Z0-9]+\)/mariadb-binlog Ver VER Distrib DISTRIB for OS (ARCH)/; replace_regex /for \S+/for OS/ /\d+/#/ /#[-_A-Za-z0-9]*-MariaDB,/#-MariaDB,/ /\(.*\)/(ARCH)/ /^.*binlog(\.exe)?/mariadb-binlog/;
exec $MYSQL_BINLOG --version; exec $MYSQL_BINLOG --version;
--echo # --echo #
......
...@@ -88,5 +88,6 @@ merge 0 ...@@ -88,5 +88,6 @@ merge 0
Number of pages:# Number of pages:#
Number of pages:# Number of pages:#
[4]:# Print the version of innochecksum and exit [4]:# Print the version of innochecksum and exit
innochecksum Ver #.#.## Restart the DB server innochecksum from #.#.#-MariaDB, client #.# for OS (ARCH)
# Restart the DB server
DROP TABLE t1; DROP TABLE t1;
...@@ -62,7 +62,7 @@ open IN_FILE,"<", "$dir/tmp/$file" or die $!; ...@@ -62,7 +62,7 @@ open IN_FILE,"<", "$dir/tmp/$file" or die $!;
open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!; open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!;
while(<IN_FILE>) { while(<IN_FILE>) {
unless ($_=~ /^debug.*$/ || $_=~ /\-#, \-\-debug.*$/ || $_=~ /http:.*html/) { unless ($_=~ /^debug.*$/ || $_=~ /\-#, \-\-debug.*$/ || $_=~ /http:.*html/) {
$_=~ s/^\S*innochecksum.+Ver.+[0-9]*\.[0-9]*\.[0-9]*.+$/innochecksum Ver #.#.#/g; $_=~ s/^\S*innochecksum.* from .+$/innochecksum Ver #.#.#/g;
$_=~ s/(Copyright\s\(c\))\s([0-9]*),\s([0-9]*)(.*)/$1 YEAR, YEAR $4/g; $_=~ s/(Copyright\s\(c\))\s([0-9]*),\s([0-9]*)(.*)/$1 YEAR, YEAR $4/g;
$_=~ s/Usage:.*\[-c/Usage: innochecksum [-c/g; $_=~ s/Usage:.*\[-c/Usage: innochecksum [-c/g;
print OUT_FILE $_; print OUT_FILE $_;
...@@ -85,7 +85,7 @@ EOF ...@@ -85,7 +85,7 @@ EOF
--exec $INNOCHECKSUM -c $MYSQLD_DATADIR/test/t1.ibd --exec $INNOCHECKSUM -c $MYSQLD_DATADIR/test/t1.ibd
--echo [4]:# Print the version of innochecksum and exit --echo [4]:# Print the version of innochecksum and exit
--replace_regex /.*innochecksum.*Ver.*[0-9]*.[0-9]*.[0-9]*.*/innochecksum Ver #.#.#/ --replace_regex /for \S+/for OS/ /\d+/#/ /#[-_A-Za-z0-9]*-MariaDB,/#-MariaDB,/ /\(.*\)/(ARCH)/ /^.*innochecksum(\.exe)?/innochecksum/
--exec $INNOCHECKSUM -V $MYSQLD_DATADIR/test/t1.ibd --exec $INNOCHECKSUM -V $MYSQLD_DATADIR/test/t1.ibd
--echo # Restart the DB server --echo # Restart the DB server
......
...@@ -40,7 +40,7 @@ then ...@@ -40,7 +40,7 @@ then
fi fi
# Check client version # Check client version
if ! $MYSQL_CLIENT --version | grep -q -E 'Distrib 10\.[1-9]'; then if ! $MYSQL_CLIENT --version | grep -q -E '(Distrib 10\.[1-9])|( from 1[1-9]\.)'; then
$MYSQL_CLIENT --version >&2 $MYSQL_CLIENT --version >&2
wsrep_log_error "this operation requires MySQL client version 10.1 or newer" wsrep_log_error "this operation requires MySQL client version 10.1 or newer"
exit $EINVAL exit $EINVAL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment