Commit 09cf0a62 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-7780 - Support for faking server version

Embedded now supports "--version=<version>", while "--version" is still silently
ignored. Also only run protocol check in non-embedded mode.
parent 39fb9472
SELECT @@version;
perl;
$cnt= grep /my_favorite_version/, `$ENV{MYSQL} -e status`;
$cnt= $ENV{MYSQL_TEST} =~ /mysqltest_embedded / ? 1 :
grep /my_favorite_version/, `$ENV{MYSQL} -e status`;
print "$cnt\n";
EOF
......@@ -8946,20 +8946,20 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
binlog_format_used= true;
break;
#include <sslopt-case.h>
#ifndef EMBEDDED_LIBRARY
case 'V':
if (argument)
{
strmake(server_version, argument, sizeof(server_version) - 1);
set_sys_var_value_origin(&server_version_ptr, sys_var::CONFIG);
}
#ifndef EMBEDDED_LIBRARY
else
{
print_version();
opt_abort= 1; // Abort after parsing all options
}
break;
#endif /*EMBEDDED_LIBRARY*/
break;
case 'W':
if (!argument)
global_system_variables.log_warnings++;
......
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