Skip to content

Commit

Permalink
plugins.test_sql_service --valgrind
Browse files Browse the repository at this point in the history
plugin var check function must store the new variable value in *save
  • Loading branch information
vuvova committed Mar 27, 2024
1 parent f50694c commit 721a6a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/test_sql_service/test_sql_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
static int run_test(MYSQL_THD thd, struct st_mysql_sys_var *var, void *save,
struct st_mysql_value *value)
{
*(my_bool*)save= 1; // must initialize the return value
return (test_passed= (do_tests() == 0)) == 0;
}

Expand All @@ -139,6 +140,7 @@ static int run_sql(MYSQL *mysql, void *save, struct st_mysql_value *value)
int len= 0;
MYSQL_RES *res;

*(my_bool*)save= 1; // must initialize the return value
str= value->val_str(value, NULL, &len);

if (mysql_real_query(mysql, str, len))
Expand Down

0 comments on commit 721a6a5

Please sign in to comment.