[MDEV-9651] Simplify audit event dispatching Created: 2016-02-28  Updated: 2016-03-08  Resolved: 2016-03-08

Status: Closed
Project: MariaDB Server
Component/s: Plugins
Fix Version/s: 10.2.0

Type: Task Priority: Major
Reporter: Sergey Vojtovich Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Sprint: 10.2.0-7

 Description   

Currently audit event dispatching looks like:

mysql_audit_notify_connection_connect() -> mysql_audit_notify() -> connection_class_handler() -> event_class_dispatch() -> plugins_dispatch() -> plugin->event_notify()

This construct:

  • adds unnecessary complexity when adding new event types
  • performance overhead: 6 functions in chains, at least 3 can't be inlined
  • shown to be vulnerable to programming mistakes

We should strive for:

mysql_audit_notify_connection_connect() -> plugin->event_notify()

If the latter is complex, at least the following should be trivial to implement:

mysql_audit_notify_connection_connect() -> event_class_dispatch() -> plugins_dispatch() -> plugin->event_notify()



 Comments   
Comment by Sergey Vojtovich [ 2016-03-01 ]

serg, please review patch for this task.

Generated at Thu Feb 08 07:36:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.