← Back to team overview

maria-developers team mailing list archive

Re: MDEV-255: Compile handlersocket plugin in 5.5

 

Hi, Vladislav!

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?

> +  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.

> +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.

> +
>  #define MYSQL_SERVER 1
>  
Regards,
Sergei


Follow ups