← Back to team overview

maria-developers team mailing list archive

Re: [Commits] ed5ec30: MDEV-7780 - Support for faking server version

 

Hi Sergei,

On Thu, Dec 24, 2015 at 01:24:09PM +0100, Sergei Golubchik wrote:
> Hi, Sergey!
> 
> On Dec 24, Sergey Vojtovich wrote:
> > revision-id: ed5ec30f9ca448086db5acbfd5f484a534119810 (mariadb-10.1.8-101-ged5ec30)
> > parent(s): 1f19c6aa93de730cd10c9fcbb337f9ec5c30ef9d
> > committer: Sergey Vojtovich
> > timestamp: 2015-12-24 15:46:18 +0400
> > message:
> > 
> > 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.
> 
> As I said on irc, I'd simply use not_embedded.inc, but ok, if you want
> it to work in embedded, sure, do it.
> 
> One question below.
> 
> > ---
> >  mysql-test/suite/sys_vars/t/version.test | 3 ++-
> >  sql/mysqld.cc                            | 4 ++--
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/mysql-test/suite/sys_vars/t/version.test b/mysql-test/suite/sys_vars/t/version.test
> > index 7955bf8..daa9538 100644
> > --- a/mysql-test/suite/sys_vars/t/version.test
> > +++ b/mysql-test/suite/sys_vars/t/version.test
> > @@ -1,5 +1,6 @@
> >  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`;
> 
> Why wouldn't you use mysql_embedded in this case?
> Like
> 
>   $mysql= $ENV{MYSQL_TEST} =~ /mysqltest_embedded / ? 'MYSQL_EMBEDDED' : 'MYSQL';
>   $cnt= grep /my_favorite_version/, `$ENV{$mysql} -e status`;
- mtr is looking for this binary in $basedir/libmysqld, while the correct path
  is something like $bindir/libmysqld/examples$opt_vs_config => it's broken
- mtr doesn't add arguments to $ENV{MYSQL_EMBEDDED}, like it does for
  $ENV{MYSQL} => it's dead broken
- we don't seem to install this binary => extra logic to handle installed tree
- it won't connect to original server, so it needs another version arg
- what's the point of testing protocol when there's no protocol whatsoever?

Regards,
Sergey


Follow ups

References