← Back to team overview

maria-developers team mailing list archive

Re: MDEV-15 Log all SQL errors. in file:///home/hf/wmar/mdev15/

 

Hi, Holyfoot!

Just two comments, see below.
Please fix and push ASAP!

On Mar 13, holyfoot@xxxxxxxxxxxx wrote:
> 
> ------------------------------------------------------------
> revno: 3320
> revision-id: holyfoot@xxxxxxxxxxxx-20120313160142-ljcsacc11zb34uu6
> parent: sergii@xxxxxxxxx-20120309082045-iyihz9ysqo82qb71
> committer: Alexey Botchkov <holyfoot@xxxxxxxxxxxx>
> branch nick: mdev15
> timestamp: Tue 2012-03-13 20:01:42 +0400
> message:
>   MDEV-15 Log all SQL errors.
>           The logger service added to provide the rotating log functions.
>           The SQL_ERROR_LOG plugin created to log the SQL errors usint that logger service.

> === added file 'include/mysql/service_logger.h'
> --- a/include/mysql/service_logger.h	1970-01-01 00:00:00 +0000
> +++ b/include/mysql/service_logger.h	2012-03-13 16:01:42 +0000
> +
> +typedef struct logger_service_file_st LOGGER_SERVICE_FILE;

small comment: please, rename to LOGGER_HANDLE or LOGGER_DESCRIPTOR,
or, say, MYSQL_LOGGER. The point is to avoid the word "FILE", because,
in principle, it may log to syslog or to a table or whatever.
(and better to avoid SERVICE too, because 1) this structure is not a
service, it's a handle, 2) services are supposed to be transparent and
invisible, they pretend to be regular function calls)

> +maria_declare_plugin(sql_errlog)
> +{
> +  MYSQL_AUDIT_PLUGIN,
> +  &descriptor,
> +  "SQL_ERROR_LOG",
> +  "Alexey Botchkov",
> +  "Log SQL level errors to a file with rotation",
> +  PLUGIN_LICENSE_GPL,
> +  sql_error_log_init,
> +  sql_error_log_deinit,
> +  0x0100,
> +  NULL,
> +  vars,
> +  NULL,
> +  0

Fix this, please. Two last values are - version (as a string), and
maturity. For example,

   "1.0",
   MariaDB_PLUGIN_MATURITY_ALPHA

> +}
> +maria_declare_plugin_end;

Regards,
Sergei


Follow ups