← Back to team overview

maria-developers team mailing list archive

Re: Rev 3824: MDEV-4472 Audit plugin

 

Hi, Holyfoot!

Generally, it looks pretty good.
One comment, see below about MARIADB_ONLY.

On Jul 02, holyfoot@xxxxxxxxxxxx wrote:
> revno: 3824
> revision-id: holyfoot@xxxxxxxxxxxx-20130702213841-xwmzadaotzxqhz2k
> parent: sergii@xxxxxxxxx-20130701155424-lx0dvaocejx0cn8l
> committer: Alexey Botchkov <holyfoot@xxxxxxxxxxxx>
> branch nick: mdev-4472
> timestamp: Wed 2013-07-03 02:38:41 +0500
> message:
>   MDEV-4472 Audit plugin.
>                 Plugin implemented in plugin/server_audit/server_audit.c.
>                 Rotating log file support modified to be mysql-service.

> === added directory 'plugin/server_audit'
> === added file 'plugin/server_audit/CMakeLists.txt'
> --- a/plugin/server_audit/CMakeLists.txt	1970-01-01 00:00:00 +0000
> +++ b/plugin/server_audit/CMakeLists.txt	2013-07-02 21:38:41 +0000
> @@ -0,0 +1,16 @@
> +# Copyright (C) 2012 Monty Program Ab.
> +# 
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; version 2 of the License.
> +# 
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +# 
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
> +
> +MYSQL_ADD_PLUGIN(server_audit server_audit.c MODULE_ONLY)

I'd remove MODULE_ONLY, if the plugin can be complied as a static
plugin. No need to add artificial restrictions.

> === added file 'plugin/server_audit/server_audit.c'
> --- a/plugin/server_audit/server_audit.c	1970-01-01 00:00:00 +0000
> +++ b/plugin/server_audit/server_audit.c	2013-07-02 21:38:41 +0000
...
> +#ifndef MARIADB_ONLY
> +#define MYSQL_SERVICE_LOGGER_INCLUDED
> +#endif /*MARIADB_ONLY*/

Is MARIADB_ONLY normally defined? 
As far as I can see, it's not. So in the packages this plugin
won't have MARIADB_ONLY.

That's ok in your tree, but let's think about how to solve this before
pushing into the main tree.

Regards,
Sergei


Follow ups