11
11
p= (logging_t *) malloc(sizeof(logging_t));
12
12
if (p == NULL) return 1;
13
memset(p, 0, sizeof(logging_st));
13
memset(p, 0, sizeof(logging_t));
15
15
plugin->data= (void *)p;
33
33
int logging_finalizer(st_plugin_int *plugin)
35
logging_st *p = (logging_st *) plugin->data;
35
logging_t *p = (logging_t *) plugin->data;
37
37
fprintf(stderr, "MRA %s plugin:%s dl:%s\n",
38
38
__func__, plugin->name.str, plugin->plugin_dl->dl.str);
54
bool logging_pre_do_i (THD *thd,
54
static bool logging_pre_iterate (THD *thd, plugin_ref plugin)
58
56
logging_t *l= plugin_data(plugin, logging_t *);
60
58
if (l && l->logging_pre)
62
if (l->logging_pre(thd, stuff))
60
if (l->logging_pre(thd))
68
void logging_pre_do (THD *thd, void *stuff)
66
void logging_pre_do (THD *thd)
70
if (plugin_foreach(thd, logging_pre_do_i, DRIZZLE_LOGGER_PLUGIN, stuff))
68
if (plugin_foreach(thd, logging_pre_iterate, DRIZZLE_LOGGER_PLUGIN))
72
70
sql_print_error("Logging plugin pre had an error.");
77
bool logging_post_do_i (THD *thd,
75
static bool logging_post_iterate (THD *thd, plugin_ref plugin)
81
77
logging_t *l= plugin_data(plugin, logging_t *);
83
79
if (l && l->logging_post)
85
if (l->logging_post(thd, stuff))
81
if (l->logging_post(thd))
91
void logging_post_do (THD *thd, void *stuff)
87
void logging_post_do (THD *thd)
93
if (plugin_foreach(thd, logging_post_do_i, DRIZZLE_LOGGER_PLUGIN, stuff))
89
if (plugin_foreach(thd, logging_post_iterate, DRIZZLE_LOGGER_PLUGIN))
95
91
sql_print_error("Logging plugin post had an error.");