← Back to team overview

maria-developers team mailing list archive

Re: MDEV-255: Compile handlersocket plugin in 5.5

 

Hi, Vladislav!

On May 07, Vladislav Vaintroub wrote:
> 
> > Do we still compile with -fno-implicit-templates?
> > I thought we don't use it anymore. We shouldn't.
> 
> Yep, we still compile with -fno-exceptions  -fno-rtti
> -fno-implicit-templates, as in ./configure.cmake.  

We need to remove -fno-implicit-templates, but not in this bugfix.

> > > === modified file 'plugin/handler_socket/handlersocket/mysql_incl.hpp'
> > > --- a/plugin/handler_socket/handlersocket/mysql_incl.hpp	2011-06-07
> > 11:19:49 +0000
> > > +++ b/plugin/handler_socket/handlersocket/mysql_incl.hpp	2012-05-05
> > 00:36:10 +0000
> > > @@ -13,7 +13,10 @@
> > >  #define HAVE_CONFIG_H
> > >  #endif
> > >
> > > +#ifndef MYSQL_DYNAMIC_PLUGIN
> > >  #define MYSQL_DYNAMIC_PLUGIN
> > > +#endif
> > 
> > I prefer not to have #ifdef, but instead write
> > 
> > #define MYSQL_DYNAMIC_PLUGIN 1
> > 
> > you apparently got macro redefinition warning, right? Because there was
> > -DMYSQL_DYNAMIC_PLUGIN on the gcc command line? It defines
> > MYSQL_DYNAMIC_PLUGIN to be 1, and when it's redefined in the source to
> > the empty string you get a warning. "Redefining" it to the same value of
> > 1 is okay, there will be no warning for it. That's why all such symbols
> > should be defined to 1, not to an empty string.
> 
> Yep, analysis is correct, there was a warning about redefined
> MYSQL_DYNAMIC_PLUGIN.  Do you think it would be better  just to remove
> MYSQL_DYNAMIC_PLUGIN  from mysql_incl.hpp, because these flag (actually
> along with MYSQL_SERVER)  is not something plugins  need to take care of?
> MYSQL_ADD_PLUGIN CMake macro does  the right thing,  or not?

MYSQL_SERVER is needed when a plugin wants to use server internal
functions, bypassing the API. HandlerSocket obviously does that, as
there's no API for what it is doing :)

MYSQL_DYNAMIC_PLUGIN should not be needed. I could speculate that it's
there either for 5.3 or for out-of-tree builds, or it's completely redundant.

Either way, you can safely remove it from our 5.5 sources.

Regards,
Sergei



References