maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #09065
Re: [Commits] 6019fee: MDEV-7780 - Support for faking server version
Hi, Sergey!
On Nov 25, Sergey Vojtovich wrote:
> revision-id: 6019fee7d84e8ec7d64337ad080a04f9c106bb68 (mariadb-10.1.8-74-g6019fee)
> parent(s): 2c29e85eafbf5bafe9c431accea9c25db7699eeb
> committer: Sergey Vojtovich
> timestamp: 2015-11-25 13:58:15 +0400
> message:
>
> MDEV-7780 - Support for faking server version
>
> Added --version=str (optional argument sets server version string).
> diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
> index 7a6541b..c109ad2 100644
> --- a/mysql-test/r/mysqld--help.result
> +++ b/mysql-test/r/mysqld--help.result
> @@ -1124,7 +1124,8 @@ The following options may be given as the first argument:
> CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
> tables in the INFORMATION_SCHEMA
> -v, --verbose Used with --help option for detailed help.
> - -V, --version Output version information and exit.
> + -V, --version[=name]
> + Output version information and exit.
This is pretty weird. That --version and --version=str have completely
different behavior.
On the other hand, the server variable is @@version, so --version=str
is kind of expected. So --set-version=str or --fake-version=str aren't
very intuitive either.
I don't know a good solution to this. Use --version? Use --set-version
or --fake-version?
> --wait-timeout=# The number of seconds the server waits for activity on a
> connection before closing it
>
> diff --git a/mysql-test/suite/sys_vars/t/version.test b/mysql-test/suite/sys_vars/t/version.test
> new file mode 100644
> index 0000000..3bc3f2b
> --- /dev/null
> +++ b/mysql-test/suite/sys_vars/t/version.test
> @@ -0,0 +1 @@
> +SELECT @@version;
> diff --git a/sql/mysqld.cc b/sql/mysqld.cc
would be nice to have a test of the version as sent in the protocol.
You can use, for example, mysql client to show that version.
Regards,
Sergei
Follow ups