diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-02 17:46:22 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-02 17:46:22 +0300 |
commit | e82fe21e3ac3141c92b7c4fb2d1fc3c083d834e8 (patch) | |
tree | 3ecf4329b6a623165aa6cb392ae71998de50c89e /sql/sql_audit.cc | |
parent | 709f0510e32981c59d7353e55a564073939db770 (diff) | |
parent | 7f1e1309bbd54a7923cf33a37938a29171ca0993 (diff) | |
download | mariadb-git-e82fe21e3ac3141c92b7c4fb2d1fc3c083d834e8.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_audit.cc')
-rw-r--r-- | sql/sql_audit.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc index e8a00abf30b..ed175ae4865 100644 --- a/sql/sql_audit.cc +++ b/sql/sql_audit.cc @@ -119,12 +119,27 @@ void mysql_audit_acquire_plugins(THD *thd, ulong *event_class_mask) { plugin_foreach(thd, acquire_plugins, MYSQL_AUDIT_PLUGIN, event_class_mask); add_audit_mask(thd->audit_class_mask, event_class_mask); + thd->audit_plugin_version= global_plugin_version; } DBUG_VOID_RETURN; } /** + Check if there were changes in the state of plugins + so we need to do the mysql_audit_release asap. + + @param[in] thd + +*/ + +my_bool mysql_audit_release_required(THD *thd) +{ + return thd && (thd->audit_plugin_version != global_plugin_version); +} + + +/** Release any resources associated with the current thd. @param[in] thd @@ -159,6 +174,7 @@ void mysql_audit_release(THD *thd) /* Reset the state of thread values */ reset_dynamic(&thd->audit_class_plugins); bzero(thd->audit_class_mask, sizeof(thd->audit_class_mask)); + thd->audit_plugin_version= -1; } |