← Back to team overview

maria-developers team mailing list archive

Re: MDEV-255: Compile handlersocket plugin in 5.5

 


> -----Original Message-----
> From: maria-developers-
> bounces+wlad=montyprogram.com@xxxxxxxxxxxxxxxxxxx [mailto:maria-
> developers-bounces+wlad=montyprogram.com@xxxxxxxxxxxxxxxxxxx] On
> Behalf Of Sergei Golubchik
> Sent: Samstag, 5. Mai 2012 07:24
> To: maria-developers@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Maria-developers] MDEV-255: Compile handlersocket plugin in
> 5.5
> 
> Hi, Vladislav!

Hi Serg,

> On May 05, Vladislav Vaintroub wrote:
> > ------------------------------------------------------------
> > revno: 3398
> > revision-id: wlad@xxxxxxxxxxxxxxxx-20120505003610-rz89d70v8c6n5v0c
> > parent: wlad@xxxxxxxxxxxxxxxx-20120504152240-ptie9ox0vjqqukd4
> > committer: Vladislav Vaintroub <wlad@xxxxxxxxxxxxxxxx>
> > branch nick: 5.5
> > timestamp: Sat 2012-05-05 02:36:10 +0200
> > message:
> >   MDEV-255: Compile handlersocket plugin in 5.5
> 
> > === added file 'plugin/handler_socket/CMakeLists.txt'
> > --- a/plugin/handler_socket/CMakeLists.txt	1970-01-01 00:00:00 +0000
> > +++ b/plugin/handler_socket/CMakeLists.txt	2012-05-05 00:36:10 +0000
> > @@ -0,0 +1,41 @@
> > +
> > +IF(WIN32 OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
> > +  # Handlersocket does not compile on Windows, compiles but does
> > +  # not start on FreeBSD.
> 
> Why does it not start of BSD?

. getaddrinfo used to have partially uninitialized parameter (structure
hints), and function failed with EAI_BADHINTS , and plugin does a fatal_exit
(wrote error message and  exited process)on this error.   Seems somehow to
be a problem from the first handlersocket checkin into MariaDB source,
because in upstream guithub repository, hints struct was initialized (from
the very first version).


I fixed this issue now in MariaDB, and reenabled  handlersocket on FreeBSD .

> > +  RETURN()
> > +ENDIF()
> > +
> > +#Remove -fno-implicit-templates from compiler flags(handlersocket
> would not work  with  it)
> > +IF(CMAKE_COMPILER_IS_GNUCXX)
> > +  STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS
> ${CMAKE_CXX_FLAGS})
> 
> 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.  

> > +ENDIF()
> > +
> > === 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?

Wlad





Follow ups

References