Commit graph

13 commits

Author SHA1 Message Date
Ramil Kalimullin
958695b144 removed WL7219: Audit Log Filtering from mysql-5.5. 2014-09-05 09:26:57 +04:00
Ashish Agarwal
61a79e5e85 WL#7219: Implement audit filter 2014-07-04 03:29:34 +05:30
Murthy Narkedimilli
496abd0814 Updated/added copyright headers 2014-01-06 10:52:35 +05:30
Ashish Agarwal
f5b5e6b951 WL#7076: Backporting wl6715 to support both formats in 5.5, 5.6, 5.7
Backporting wl6715 to mysql-5.5
2013-07-02 11:58:39 +05:30
Kent Boortz
9da00ebec9 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Sergey Vojtovich
9c16284758 BUG#12611785 - AUDIT INTERFACE STRICT-ALIASING WARNINGS
The types mysql_event_general/mysql_event_connection are
being cast to the incompatible type mysql_event. The way
mysql_event and the other types are designed are prone to
strict aliasing violations and can break things depending
on how compilers optimizes this code.

This patch fixes audit interface, so it confirms to strict-
aliasing rules. It introduces incompatible changes to audit
interface:
- mysql_event type has been removed;
- event_class has been removed from mysql_event_generic and
  mysql_event_connection types;
- st_mysql_audit::event_notify() second argument is event_class;
- st_mysql_audit::event_notify() third argument is event of type
  (const void *).

"Writing Audit Plugins" section of manual should be updated:
http://dev.mysql.com/doc/refman/5.5/en/writing-audit-plugins.html
2011-06-03 11:27:11 +04:00
Sergey Vojtovich
9b6ba6a99a WL#5571 - Audit interface: MYSQL_AUDIT_GENERAL_STATUS event 2010-12-14 17:34:23 +03:00
Sergey Vojtovich
b8aceb707f BUG#54989 - With null_audit installed, server hangs on an
attempt to install a plugin twice

Server crashes when [UN]INSTALL PLUGIN fails (returns an
error) and general log is disabled and there are audit
plugins interested in MYSQL_AUDIT_GENERAL_CLASS. 

When audit event is triggered, audit subsystem acquires interested
plugins by walking through plugin list. Evidently plugin list
iterator protects plugin list by acquiring LOCK_plugin, see
plugin_foreach_with_mask().

On the other hand [UN]INSTALL PLUGIN is acquiring LOCK_plugin
rather for a long time.

When audit event is triggered during [UN]INSTALL PLUGIN, plugin
list iterator acquires the same lock (within the same thread)
second time.

Repeatable only with general_log disabled, because general_log
triggers MYSQL_AUDIT_GENERAL_LOG event, which acquires audit
plugins before [UN]INSTALL PLUGIN acquired LOCK_plugin.

With this fix we pre-acquire audit plugins for events that
may potentially occur during [UN]INSTALL PLUGIN.

This hack should be removed when LOCK_plugin is fixed so it
protects only what it supposed to protect.

No test case for this fix - we do not have facility to test
audit plugins yet.
2010-08-20 13:58:28 +04:00
Sergey Vojtovich
a2ed9137cc Merge fixes for BUG46587 and BUG47059 to trunk-bugfixing. 2010-04-15 13:36:36 +04:00
Sergey Vojtovich
1b12f4c233 BUG#47059 - In audit plugin I cannot see the event subclasses,
e.g.MYSQL_AUDIT_GENERAL_ERROR

General audit API (MYSQL_AUDIT_GENERAL_CLASS) didn't expose event
subclass to plugins.

This patch exposes event subclass to plugins via
struct mysql_event_general::event_subclass.

This change is not compatible with existing general audit plugins.
Audit interface major version has been incremented.
2010-04-15 13:05:17 +04:00
Mats Kindahl
e409d6f69c WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Sergey Vojtovich
92985af1ff Merge backport of WL#3771 with mysql-next-mr. 2010-01-19 17:30:55 +04:00
Sergey Vojtovich
94098b22c0 Backport from 6.0-codebase.
WL#3771
  "Audit Plugin Interface"
  Implement new plug-in type - AUDIT
  New plug-in: audit_null
    simply increments counter for how many times it was called.
2009-12-15 23:52:47 +04:00